mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-10-13 07:22:02 +00:00
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:
parent
5ea9c01bb2
commit
a14faa36bb
16 changed files with 773 additions and 1040 deletions
|
@ -322,16 +322,17 @@ pub fn join(relation: TableFactor) -> Join {
|
|||
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(),
|
||||
args: FunctionArguments::List(FunctionArgumentList {
|
||||
duplicate_treatment: None,
|
||||
args: args
|
||||
.into_iter()
|
||||
.map(|arg| FunctionArg::Unnamed(FunctionArgExpr::Expr(arg)))
|
||||
.collect(),
|
||||
clauses: vec![],
|
||||
}),
|
||||
filter: None,
|
||||
null_treatment: None,
|
||||
over: None,
|
||||
distinct: false,
|
||||
special: false,
|
||||
order_by: vec![],
|
||||
within_group: vec![],
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue