Skip to content
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 AggregateExpr abstraction layer #11810

Closed
lewiszlw opened this issue Aug 5, 2024 · 6 comments · Fixed by #12096
Closed

Remove AggregateExpr abstraction layer #11810

lewiszlw opened this issue Aug 5, 2024 · 6 comments · Fixed by #12096
Labels
enhancement New feature or request

Comments

@lewiszlw
Copy link
Member

lewiszlw commented Aug 5, 2024

Is your feature request related to a problem or challenge?

Now all aggr functions have been migrated to UDAF. The AggregateExpr trait just has one implementation.

impl AggregateExpr for AggregateFunctionExpr {
    ...
}

Should we remove unnecessary AggregateExpr abstraction layer?

Describe the solution you'd like

No response

Describe alternatives you've considered

No response

Additional context

No response

@lewiszlw lewiszlw added the enhancement New feature or request label Aug 5, 2024
@jayzhan211
Copy link
Contributor

It is not clear to me whether it is a good idea. Maybe hold on and review it after the refactor #11359 ?

@lewiszlw
Copy link
Member Author

lewiszlw commented Aug 6, 2024

Sure. We could wait to see more opinions.

@alamb
Copy link
Contributor

alamb commented Aug 19, 2024

Now all aggr functions have been migrated to UDAF. The AggregateExpr trait just has one implementation.

This seems like a compelling reason to remove AggregateExpr (it is unecessary and makes the code more complicated)

It is not clear to me whether it is a good idea. Maybe hold on and review it after the refactor #11359 ?

Now that #11359 is done, @jayzhan211 do you have any additional thoughts?

I agree with your comment on https://github.com/apache/datafusion/pull/11989/files#r1720745280 that there is room for improvement here

@jayzhan211
Copy link
Contributor

I think we could try removing trait AggregateExpr and see whether this simplified the code.

@lewiszlw
Copy link
Member Author

trait AggregateExpr and AggregateFunctionExpr live in different crates. We should solve dependency problem first...

@jayzhan211
Copy link
Contributor

jayzhan211 commented Aug 21, 2024

I think the code that has AggregateExpr are all in physical layer, replacing AggregateExpr with AggregateFunctionExpr doesn't have dependency issue, did I miss anything?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants