-
Notifications
You must be signed in to change notification settings - Fork 634
MQE: add support for sort
and sort_desc
#10487
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
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.
lgtm, just a couple of small things
test_metric{case="histogram with +Inf"} {{count:0 sum:Inf}} {{count:0 sum:Inf}} {{count:0 sum:Inf}} {{count:0 sum:Inf}} {{count:0 sum:Inf}} | ||
test_metric{case="histogram with -Inf"} {{count:0 sum:-Inf}} {{count:0 sum:-Inf}} {{count:0 sum:-Inf}} {{count:0 sum:-Inf}} {{count:0 sum:-Inf}} | ||
|
||
# Sorting of identical values is not stable, so we exclude those from these test cases and check them below. |
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.
Is there why there's no gauntlet? Otherwise we should add these there.
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.
Yep, and also the fact that sort
/ sort_desc
only apply to instant queries, but the gauntlet only does range queries.
546f045
to
be6e2b2
Compare
What this PR does
This PR adds support in MQE for
sort
andsort_desc
.Performance compared to Prometheus' engine is slightly better, and peak memory consumption is the same:
Given
sort
andsort_desc
only apply to instant queries and we have to load the entire set of data into memory to sort it, there's not much room for improvement over Prometheus' engine.Which issue(s) this PR fixes or relates to
#10067
Checklist
CHANGELOG.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]
.about-versioning.md
updated with experimental features.