You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem or challenge?
Part of #8708
The background is that we are moving builtin aggregate function to functions-aggregate as an UDAF
While moving count to UDAF, I found that we need to call UDAF in the optimize rule single_distinct_to_groupby.
I think we need to move the rule that has aggregate function out of the core because the optimizer is the core of the datafusion that we would like to prevent importing the functions-aggregate crate
Describe the solution you'd like
Optimizer
Move common optimizer things to optimizer-common crate or datafusion-expr crate
Move rules to functions-aggregate
jayzhan211
changed the title
Introduce user-defined-optimizer for user-defined function
Move optimizer rule that has UDF or UDAF out of core
May 11, 2024
jayzhan211
changed the title
Move optimizer rule that has UDF or UDAF out of core
Move optimizer rule that has aggregate function out of core
May 11, 2024
I think the single distinct aggregate removal rule is general to all aggreagetes (it isn't aggregate specific) including user defined ones so I am not sure we need to move the rules.
BTW this PR is updating single distinct aggregate rule #10460
I thought I need to import functions-aggregate to create new aggregate function expression, but I found out that I could just modify AggregateFunction directly, since the function does not change.
Is your feature request related to a problem or challenge?
Part of #8708
The background is that we are moving builtin aggregate function to
functions-aggregate
as an UDAFWhile moving
count
to UDAF, I found that we need to call UDAF in the optimize rulesingle_distinct_to_groupby
.I think we need to move the rule that has aggregate function out of the core because the optimizer is the core of the datafusion that we would like to prevent importing the
functions-aggregate
crateDescribe the solution you'd like
Optimizer
Move common optimizer things to
optimizer-common
crate ordatafusion-expr
crateMove rules to
functions-aggregate
single_distinct_to_groupby
Analyzer
FunctionRewrite
API, Move Array specific rewrites todatafusion_functions_array
#9583Describe alternatives you've considered
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: