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

Reduce InternalHistogram and InternalDateHistogram in a streaming fashion #105359

Merged
merged 4 commits into from
Feb 12, 2024

Conversation

iverase
Copy link
Contributor

@iverase iverase commented Feb 9, 2024

Similarly to #105348 InternalHistogram and InternalDateHistogram can be wasteful and can be reduced in a streaming fashion. In this case we introduce a HistogramMultiBucketsAggregatorReducer to do the job.

This change might be more controversial because we change from collecting buckets on a priority queue to use a LongObjectPagedHashMap to keep track of the reduced buckets. I feel this approach will be faster but I lack of feeling of the performance profile of LongObjectPagedHashMap.

relates #105207

@elasticsearchmachine elasticsearchmachine added the Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) label Feb 9, 2024
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-analytical-engine (Team:Analytics)

Copy link
Member

@nik9000 nik9000 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's good. These are also fairly uncontroversial to me because the merge operation is just hashing.

@nik9000
Copy link
Member

nik9000 commented Feb 9, 2024

Also! I think it'd be good to wait until next week to merge this so we can get a couple of overnight runs with the last few changes.

@iverase iverase merged commit f942605 into elastic:main Feb 12, 2024
14 checks passed
@iverase iverase deleted the HistogramMultiBucketsAggregatorReducer branch February 12, 2024 09:24
iverase added a commit that referenced this pull request May 3, 2024
…gram aggregation (#108184)

 #105359. we changed the bucket ordering for partial reduces which causes issues when the output is shared with a 
node running on an older version. This commit reorders the output to the expected order for previous versions.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Analytics/Aggregations Aggregations >non-issue Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) v8.13.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants