Skip to content

Unify Expr::AggregateFunction and Expr::AggregateUDF #8346

@alamb

Description

@alamb

Is your feature request related to a problem or challenge?

Part of #8045 we are working
to consolidate the function implementation in DataFusion to make it easier to
manage DataFusion's built in list of functions as well as ensure user defined
and built in functions have the same feature sets.

I think it is also important to keep the Expr representation consistent for
Aggregate and Window functions to make DataFusion easier to work with, as well
as to permit eventually applying the same unification of built in and user
defined functions to aggregates and window functions.

Describe the solution you'd like

I would like to unify Expr::AggregateFunction and Expr::AggregateUDF following the pattern in #8258 @2010YOUY01:

  1. Remove Expr::AggregateUDF
  2. Add an AggregateFunctionDefinition that mirrors ScalarFunctionDefinition
  3. Update Expr::AggregateFunction so that it is used for both built in and user defined functions
  4. Update the code to use these new APIs

Describe alternatives you've considered

No response

Additional context

I think this is a pretty good first issue because we have an existing pattern in #8258

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions