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 hppc from nested aggs #86078

Merged
merged 2 commits into from
Apr 21, 2022
Merged

Remove hppc from nested aggs #86078

merged 2 commits into from
Apr 21, 2022

Conversation

rjernst
Copy link
Member

@rjernst rjernst commented Apr 21, 2022

The nested and reverse nested aggs use hppc maps and lists for mapping buckets to
ordinals. This commit converts these to use HashMaps and ArrayLists.

relates #84735

The nested and reverse nested aggs use hppc maps and lists for mapping buckets to
ordinals. This commit converts these to use HashMaps and ArrayLists.

relates elastic#84735
@rjernst rjernst requested a review from martijnvg April 21, 2022 14:29
@elasticmachine elasticmachine added the Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) label Apr 21, 2022
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-analytics-geo (Team:Analytics)

Copy link
Member

@martijnvg martijnvg left a comment

Choose a reason for hiding this comment

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

I left one question. Otherwise LGTM 👍

collectBucket(sub, childDocId, buffer[i]);
}
final int docId = childDocId;
bucketBuffer.stream().mapToLong(Long::longValue).forEach(bucket -> {
Copy link
Member

Choose a reason for hiding this comment

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

Maybe use a regular for loop here? I notice that we have been avoiding to use steam() in hot code paths. I think we should do this here too? But Maybe I'm wrong here.

Copy link
Member Author

Choose a reason for hiding this comment

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

I had done the stream because I was trying to avoid materializing a primitive array. But I realized now I could just iterate over the boxed values and let java do the auto unboxing on the call to collectBucket.

@rjernst rjernst mentioned this pull request Apr 21, 2022
43 tasks
@rjernst rjernst merged commit 91b5272 into elastic:master Apr 21, 2022
@rjernst rjernst deleted the hppc/aggs branch April 21, 2022 18:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Analytics/Aggregations Aggregations >refactoring Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) v8.3.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants