-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Remove ArrayAgg Builtin in favor of UDF #11611
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -573,8 +573,9 @@ impl AggregateExpr for AggregateFunctionExpr { | |
}) | ||
.collect::<Vec<_>>(); | ||
let mut name = self.name().to_string(); | ||
// TODO: Generalize order-by clause rewrite | ||
if reverse_udf.name() == "ARRAY_AGG" { | ||
// If the function is changed, we need to reverse order_by clause as well | ||
// i.e. First(a order by b asc null first) -> Last(a order by b desc null last) | ||
if self.fun().name() == reverse_udf.name() { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I guess name checking is enough for now. Introduce There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think it would be good to eventually move this to a method in There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
} else { | ||
replace_order_by_clause(&mut name); | ||
} | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -199,4 +199,4 @@ Raphael R false false true true | |
NULL R NULL NULL NULL NULL | ||
|
||
statement ok | ||
drop table test; | ||
drop table test; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉