Decouple builtin aggregate function first_value
from optimize rule replace_distinct_aggregate
#10703
Labels
enhancement
New feature or request
Is your feature request related to a problem or challenge?
If we move the built-in function out of the optimizer, it is more easy to extend/adapt the optimizer rule to other UDAFs. For example, change the
first_value
(datafusion builtin) tofirst_value
(UDAF) ormy_function
(UDAF) inreplace_distinct_aggregate
.Discussion from #10648 (comment)
Describe the solution you'd like
replace_distinct_aggregate
to functions-aggregate as part of the builtin optimize rule, and register the rule to optimizer rules"first_value"
here, if they havefirst_value
UDAF, they can take advantage of this rule by replacing thefirst_value
to their version.Describe alternatives you've considered
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: