-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
ESQL: Add aggregates node level reduction #107876
Conversation
…add_node_reduction
@elasticmachine update branch |
Pinging @elastic/es-analytical-engine (Team:Analytics) |
Hi @astefan, I've created a changelog YAML for you. |
@elasticmachine update branch |
@elasticmachine run elasticsearch-ci/bwc-snapshots |
@elasticmachine run elasticsearch-ci/8.15.0 / bwc-snapshots |
@elasticmachine update branch |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks @astefan.
aggregatorMode = AggregatorMode.INITIAL; | ||
} | ||
} else { | ||
aggregatorMode = AggregatorMode.INITIAL; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be AggregatorMode.SINGLE
instead? Can we assert false: ...
here since we shouldn't reach this point in our current code base.
if (mode == AggregateExec.Mode.FINAL) { | ||
aggregatorMode = AggregatorMode.FINAL; | ||
} else if (mode == AggregateExec.Mode.PARTIAL) { | ||
if (aggregateExec.child() instanceof ExchangeSourceExec) {// the reducer step at data node (local) level |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like there should be a better way to plug this in. This feels like it'd break in a sneaky way one day.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, we can add a new aggregation mode.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 created #108468.
…add_node_reduction
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
…add_node_reduction
…icsearch into add_node_reduction
* Add aggregation intermediate reduction level and estimatedRowSize computed value
This adds the remaining aggregate node-level reduction, following #106516.
Also, it estimates the row size for TopN and Aggregate node-level reduction plans.