Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 13 commits into from
May 3, 2024
346 changes: 159 additions & 187 deletions src/ast/mod.rs

Large diffs are not rendered by default.

12 changes: 9 additions & 3 deletions src/ast/visitor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@ where
/// ```
/// # use sqlparser::parser::Parser;
/// # use sqlparser::dialect::GenericDialect;
/// # use sqlparser::ast::{Expr, Function, FunctionArg, FunctionArgExpr, Ident, ObjectName, Value, visit_expressions_mut, visit_statements_mut};
/// # use sqlparser::ast::*;
/// # use core::ops::ControlFlow;
/// let sql = "SELECT x, y FROM t";
/// let mut statements = Parser::parse_sql(&GenericDialect{}, sql).unwrap();
Expand All @@ -525,9 +525,15 @@ where
/// let old_expr = std::mem::replace(expr, Expr::Value(Value::Null));
/// *expr = Expr::Function(Function {
/// name: ObjectName(vec![Ident::new("f")]),
/// args: vec![FunctionArg::Unnamed(FunctionArgExpr::Expr(old_expr))],
/// args: FunctionArguments::List(FunctionArgumentList {
/// duplicate_treatment: None,
/// args: vec![FunctionArg::Unnamed(FunctionArgExpr::Expr(old_expr))],
/// clauses: vec![],
/// }),
/// null_treatment: None,
/// filter: None, over: None, distinct: false, special: false, order_by: vec![],
/// filter: None,
/// over: None,
/// within_group: vec![],
/// });
/// }
/// ControlFlow::<()>::Continue(())
Expand Down
2 changes: 0 additions & 2 deletions src/keywords.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ define_keywords!(
ARCHIVE,
ARE,
ARRAY,
ARRAY_AGG,
ARRAY_MAX_CARDINALITY,
AS,
ASC,
Expand Down Expand Up @@ -401,7 +400,6 @@ define_keywords!(
LIKE_REGEX,
LIMIT,
LINES,
LISTAGG,
LN,
LOAD,
LOCAL,
Expand Down
Loading
Loading