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

Composite aggregation could avoid loading global ordinals entirely #47452

Closed
jimczi opened this issue Oct 2, 2019 · 6 comments · Fixed by #74559
Closed

Composite aggregation could avoid loading global ordinals entirely #47452

jimczi opened this issue Oct 2, 2019 · 6 comments · Fixed by #74559
Labels
>enhancement stalled Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo)

Comments

@jimczi
Copy link
Contributor

jimczi commented Oct 2, 2019

Currently a composite aggregation on a keyword field will use global ordinals to ensure that comparisons between segments is fast. However the composite aggregation keeps track of the top N composite bucket so we should be able to use the segment ordinal when collecting inside a segment and map the top N to the next segment ordinals when we go to the next segment. Since N should be small the overhead of mappings these ordinals should be low and the big advantage is that we wouldn't require global ordinals to be loaded.

@elasticmachine
Copy link
Collaborator

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

@nik9000 nik9000 self-assigned this Jan 8, 2020
@rjernst rjernst added the Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) label May 4, 2020
@boicehuang
Copy link
Contributor

Is there any progress here?

@jakommo
Copy link
Contributor

jakommo commented Jun 9, 2021

@nik9000 was talking to a user about this and I see you self assigned it a while ago. Is this still something on your list ?

@nik9000
Copy link
Member

nik9000 commented Jun 9, 2021

@nik9000 was talking to a user about this and I see you self assigned it a while ago. Is this still something on your list ?

Sorry, not really. That was a speculative assignment and I ended up wandering off into another direction. Though @not-napoleon might be interested to read this as he's been spending more time with composite lately.

@nik9000 nik9000 removed their assignment Jun 9, 2021
ywelsch added a commit that referenced this issue Jun 29, 2021
A composite aggregation on a keyword field requires global ordinals today to ensure fast comparisons between
segments. It only needs to keep track of the top N composite buckets, however. Since N is typically small, we can just
use the segment ordinal for comparison when collecting inside a segment and remap ordinals when we go to the next
segment.

Closes #47452
ywelsch added a commit that referenced this issue Jun 29, 2021
A composite aggregation on a keyword field requires global ordinals today to ensure fast comparisons between
segments. It only needs to keep track of the top N composite buckets, however. Since N is typically small, we can just
use the segment ordinal for comparison when collecting inside a segment and remap ordinals when we go to the next
segment.

Closes #47452
@wchaparro wchaparro reopened this Feb 2, 2022
@wchaparro
Copy link
Member

wchaparro commented Feb 2, 2022

Reopening, as we still want to do this. We had to revert the original commit as it caused a perf degradation. This is pending benchmarks on composite, so marking as stalled at this time.

@wchaparro wchaparro removed the help wanted adoptme label Feb 2, 2022
@wchaparro
Copy link
Member

closing as not planned.

@wchaparro wchaparro closed this as not planned Won't fix, can't repro, duplicate, stale Feb 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>enhancement stalled Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants