mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-09-03 12:47:21 +00:00
Move existing SF tests to sqlparser_snowflake.rs
Co-authored-by: Eyal Leshem <eyal@satoricyber.com>
This commit is contained in:
parent
54be3912a9
commit
99fb633221
4 changed files with 86 additions and 62 deletions
|
@ -143,3 +143,19 @@ pub fn expr_from_projection(item: &SelectItem) -> &Expr {
|
|||
pub fn number(n: &'static str) -> Value {
|
||||
Value::Number(n.parse().unwrap())
|
||||
}
|
||||
|
||||
pub fn table(name: impl Into<String>) -> TableFactor {
|
||||
TableFactor::Table {
|
||||
name: ObjectName(vec![Ident::new(name.into())]),
|
||||
alias: None,
|
||||
args: vec![],
|
||||
with_hints: vec![],
|
||||
}
|
||||
}
|
||||
|
||||
pub fn join(relation: TableFactor) -> Join {
|
||||
Join {
|
||||
relation,
|
||||
join_operator: JoinOperator::Inner(JoinConstraint::Natural),
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue