-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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 Min
/Max
references from AggregateStatistics
#11153
Comments
take |
Thanks @Rachelint -- I also have some time later this week to help with this issue (if it might help to have one or two examples as we work through #11151) |
Hi @alamb , I have some questions about the alternatives mentioned in the issue. trait AggregateExpr {
fn output_from_stats(&self, stats: &Statistics) -> Option<ScalarValue> { None }
...
} As I understand, it is a optimization takes effect when specific aggregate functions(such as max, min, count...) can get the results directly from stats? |
Yes that is the case I think |
It seems a function
and it is used to get min/max from stats now? datafusion/datafusion/core/src/physical_optimizer/aggregate_statistics.rs Lines 250 to 257 in 569be9e
|
Sounds like it might work -- I think the only way to really know for sure would be to try it out |
Thanks, I try it now. |
@Rachelint if you stop working on this could you please let me know? |
Sorry for delay, still working on now, will try to push codes today... |
Thanks @edmondop |
Is your feature request related to a problem or challenge?
Part of #11151 (where we are removing special case uses of Min/Max)
Describe the solution you'd like
Reemove these cases:
datafusion/datafusion/core/src/physical_optimizer/aggregate_statistics.rs
Lines 185 to 186 in 569be9e
datafusion/datafusion/core/src/physical_optimizer/aggregate_statistics.rs
Lines 197 to 198 in 569be9e
datafusion/datafusion/core/src/physical_optimizer/aggregate_statistics.rs
Lines 235 to 236 in 569be9e
datafusion/datafusion/core/src/physical_optimizer/aggregate_statistics.rs
Lines 247 to 248 in 569be9e
Specifically, the idea is to remove the pattern
and
Describe alternatives you've considered
I suggest adding a general purpose function to
AggregateExec
and then implementing it for Min and Max (so we can do the same for Min/Max UDAF)The text was updated successfully, but these errors were encountered: