mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-07-07 17:04:59 +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
|
@ -16,8 +16,9 @@
|
|||
//! is also tested (on the inputs it can handle).
|
||||
|
||||
use sqlparser::ast::{
|
||||
CreateFunctionBody, CreateFunctionUsing, Expr, Function, FunctionDefinition, Ident, ObjectName,
|
||||
SelectItem, Statement, TableFactor, UnaryOperator,
|
||||
CreateFunctionBody, CreateFunctionUsing, Expr, Function, FunctionArgumentList,
|
||||
FunctionArguments, FunctionDefinition, Ident, ObjectName, SelectItem, Statement, TableFactor,
|
||||
UnaryOperator,
|
||||
};
|
||||
use sqlparser::dialect::{GenericDialect, HiveDialect, MsSqlDialect};
|
||||
use sqlparser::parser::{ParserError, ParserOptions};
|
||||
|
@ -379,13 +380,15 @@ fn parse_delimited_identifiers() {
|
|||
assert_eq!(
|
||||
&Expr::Function(Function {
|
||||
name: ObjectName(vec![Ident::with_quote('"', "myfun")]),
|
||||
args: vec![],
|
||||
args: FunctionArguments::List(FunctionArgumentList {
|
||||
duplicate_treatment: None,
|
||||
args: vec![],
|
||||
clauses: vec![],
|
||||
}),
|
||||
null_treatment: None,
|
||||
filter: None,
|
||||
over: None,
|
||||
distinct: false,
|
||||
special: false,
|
||||
order_by: vec![],
|
||||
within_group: vec![],
|
||||
}),
|
||||
expr_from_projection(&select.projection[1]),
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue