Support Snowflake MATCH_RECOGNIZE syntax (#1222)

This commit is contained in:
Joey Hain 2024-04-22 13:17:50 -07:00 committed by GitHub
parent bf89b7d808
commit 39980e8976
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 847 additions and 9 deletions

View file

@ -307,3 +307,20 @@ pub fn join(relation: TableFactor) -> Join {
join_operator: JoinOperator::Inner(JoinConstraint::Natural),
}
}
pub fn call(function: &str, args: impl IntoIterator<Item = Expr>) -> Expr {
Expr::Function(Function {
name: ObjectName(vec![Ident::new(function)]),
args: args
.into_iter()
.map(FunctionArgExpr::Expr)
.map(FunctionArg::Unnamed)
.collect(),
filter: None,
null_treatment: None,
over: None,
distinct: false,
special: false,
order_by: vec![],
})
}