Remove hppc from nested aggs#86078
Merged
rjernst merged 2 commits intoelastic:masterfrom Apr 21, 2022
Merged
Conversation
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
Collaborator
|
Pinging @elastic/es-analytics-geo (Team:Analytics) |
martijnvg
approved these changes
Apr 21, 2022
Member
martijnvg
left a comment
There was a problem hiding this comment.
I left one question. Otherwise LGTM 👍
martijnvg
reviewed
Apr 21, 2022
| collectBucket(sub, childDocId, buffer[i]); | ||
| } | ||
| final int docId = childDocId; | ||
| bucketBuffer.stream().mapToLong(Long::longValue).forEach(bucket -> { |
Member
There was a problem hiding this comment.
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.
Member
Author
There was a problem hiding this comment.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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