fix(sharding): use without() grouping when merging avg_over_time shard results - #12176
Merged
Conversation
ashwanthgoli
force-pushed
the
avg-over-time-shard-noagg
branch
from
March 12, 2024 06:15
7775f65 to
68e92b9
Compare
jeschkies
approved these changes
Mar 12, 2024
jeschkies
left a comment
Contributor
There was a problem hiding this comment.
Wow. That one is one me. Incredible that it took so long. Could you add another test that's checking the output. Eg the equivalence test?
ashwanthgoli
force-pushed
the
avg-over-time-shard-noagg
branch
from
June 24, 2024 12:19
68e92b9 to
8fc47db
Compare
ashwanthgoli
marked this pull request as ready for review
June 24, 2024 12:20
chaudum
approved these changes
Jul 1, 2024
Contributor
|
This PR must be merged before a backport PR will be created. |
1 similar comment
Contributor
|
This PR must be merged before a backport PR will be created. |
Merged
8 tasks
This was referenced Jul 8, 2024
|
It seems that the fix was not included in latest release. Is there any workaround, either by modifying the query, or downgrade the server to a previous version? |
This was referenced Aug 15, 2024
This was referenced Oct 14, 2024
This was referenced Oct 21, 2024
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.
What this PR does / why we need it:
avg_over_timeexpression that uses eitherkeeporlabel_formatstage without any aggregation fails on main with the following error:aggregation operator '"sum"' without groupingGiven these expressions contain stages that could reduce the labelset, sharding converts it to the following form
sum (sum_over_time()) / sum(count_over_time()), but vector aggregation expr evaluator always expects a grouping. This pr updates theavg_over_timeshard mapper to usewithout()grouping for generating vector agg expr when it is not explicitly set.example query to reproduce this error:
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Checklist
CONTRIBUTING.mdguide (required)CHANGELOG.mdupdatedadd-to-release-noteslabeldocs/sources/setup/upgrade/_index.mdproduction/helm/loki/Chart.yamland updateproduction/helm/loki/CHANGELOG.mdandproduction/helm/loki/README.md. Example PRdeprecated-config.yamlanddeleted-config.yamlfiles respectively in thetools/deprecated-config-checkerdirectory. Example PR