Move existing SF tests to sqlparser_snowflake.rs

Co-authored-by: Eyal Leshem <eyal@satoricyber.com>
This commit is contained in:
Nickolay Ponomarev 2020-10-05 05:08:55 +03:00
parent 54be3912a9
commit 99fb633221
4 changed files with 86 additions and 62 deletions

View file

@ -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),
}
}