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

lazyquerier: deep copy hints #10228

Merged
merged 4 commits into from
Dec 19, 2024
Merged

Conversation

dimitarvdimitrov
Copy link
Contributor

@dimitarvdimitrov dimitarvdimitrov commented Dec 12, 2024

What this PR does

The promQL engine can modify the grouping that it passes to us after calling. First the LazyQuerier is called in populateSeries, and then the grouping is changed (via sorting) when evaluating the aggregate expression

Checklist

  • Tests updated.
  • Documentation added.
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX].
  • about-versioning.md updated with experimental features.

The promQL engine can modify the grouping that it passes to us after calling. First the LazyQuerier is called in [`populateSeries`](https://github.com/grafana/mimir/blob/76ab843e3bb3d6517fcd1ee47e919bd9d107ef0d/vendor/github.com/prometheus/prometheus/promql/engine.go#L953-L976), and then the grouping is changed (via sorting) when evaluating the [aggregate expression](https://github.com/grafana/mimir/blob/76ab843e3bb3d6517fcd1ee47e919bd9d107ef0d/vendor/github.com/prometheus/prometheus/promql/engine.go#L1571-L1573)

Signed-off-by: Dimitar Dimitrov <[email protected]>
Signed-off-by: Dimitar Dimitrov <[email protected]>
@dimitarvdimitrov dimitarvdimitrov marked this pull request as ready for review December 18, 2024 08:57
@dimitarvdimitrov dimitarvdimitrov requested a review from a team as a code owner December 18, 2024 08:57
Signed-off-by: Dimitar Dimitrov <[email protected]>
Copy link
Contributor

@zenador zenador left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM aside from small nit

pkg/storage/lazyquery/lazyquery_test.go Outdated Show resolved Hide resolved
Signed-off-by: Dimitar Dimitrov <[email protected]>
@dimitarvdimitrov dimitarvdimitrov enabled auto-merge (squash) December 19, 2024 13:44
@dimitarvdimitrov dimitarvdimitrov merged commit aeff3be into main Dec 19, 2024
29 checks passed
@dimitarvdimitrov dimitarvdimitrov deleted the dimitar/querier/deep-copy-hints branch December 19, 2024 14:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants