Consolidate representation of function calls, remove AggregateExpressionWithFilter, ArraySubquery, ListAgg and ArrayAgg (#1247)

Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
This commit is contained in:
Joey Hain 2024-05-03 11:46:03 -07:00 committed by GitHub
parent 5ea9c01bb2
commit a14faa36bb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
16 changed files with 773 additions and 1040 deletions

View file

@ -332,9 +332,13 @@ fn parse_window_function_with_filter() {
select.projection,
vec![SelectItem::UnnamedExpr(Expr::Function(Function {
name: ObjectName(vec![Ident::new(func_name)]),
args: vec![FunctionArg::Unnamed(FunctionArgExpr::Expr(
Expr::Identifier(Ident::new("x"))
))],
args: FunctionArguments::List(FunctionArgumentList {
duplicate_treatment: None,
args: vec![FunctionArg::Unnamed(FunctionArgExpr::Expr(
Expr::Identifier(Ident::new("x"))
))],
clauses: vec![],
}),
null_treatment: None,
over: Some(WindowType::WindowSpec(WindowSpec {
window_name: None,
@ -343,9 +347,7 @@ fn parse_window_function_with_filter() {
window_frame: None,
})),
filter: Some(Box::new(Expr::Identifier(Ident::new("y")))),
distinct: false,
special: false,
order_by: vec![]
within_group: vec![],
}))]
);
}