-
Notifications
You must be signed in to change notification settings - Fork 634
Mimir query engine: add support for aggregations with without
, and resolve potential for hash collisions
#8671
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
Conversation
without
without
, and resolve potential hash collisions
…ith potential hash collisions when aggregating
…aggregating to a single group
b66fb76
to
87df177
Compare
without
, and resolve potential hash collisionswithout
, and resolve potential for hash collisions
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.
Nice work! Just a few nits/tweaks/questions.
…plify logic and improve performance for case where multiple grouping labels are used
… and put related functions together
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.
We should add some test cases where duplicate groups exist. For example:
sum without (env, __name__, __abc__, env) metric{}
(I used __name__
explicitly since it is added. I also used __abc__
since it'll be sorted to before __name__
).
a38c176
to
3213a0f
Compare
…thout` with duplicate and unsorted grouping labels
Good idea, added in fff95c4. |
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.
Thanks. LGTM!
There's a few tests that aren't done on both by
and without
(such as the __aaa__
one), but I don't think they are necessary.
Would appreciate if this can be behind #8577
# Conflicts: # CHANGELOG.md
# Conflicts: # CHANGELOG.md
What this PR does
This PR adds support for the
without
keyword for aggregations in Mimir's query engine.It also resolves the potential for hash collisions when computing aggregation groups. This decreases performance somewhat, but is the cheapest way I can see to avoid hash collisions.
If we're happy with the
seriesToGroupLabelsStringFunc
approach here, I will investigate reusing it for binary operations in a separate PR.Performance comparison of this PR vs Prometheus' engine
Performance comparison of this PR with
main
Which issue(s) this PR fixes or relates to
(none)
Checklist
CHANGELOG.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]
.about-versioning.md
updated with experimental features.