Skip to content

Move optimizer rule that has aggregate function out of core #10455

@jayzhan211

Description

@jayzhan211

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

  • single_distinct_to_groupby
  • common_subexpr_eliminate
  • decorrelate
  • replace_distinct_aggregate

Analyzer

Describe alternatives you've considered

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions