Repository navigation
feat: approximate-by-default measures with exact_expression and an inline exact chip - #10032
Open
nishantmonu51 wants to merge 4 commits into
Open
nishantmonu51 wants to merge 4 commits into
nishantmonu51 wants to merge 4 commits into
Conversation
…inline exact chip Measures can define an `exact_expression` next to their approximate `expression`. Queries flag measures with `exact`; the runtime resolves the exact set once per query, skips rollups for it and honours the `rill.metrics.exact_measures` kill switch. Explore and canvas dashboards show a `≈`/`=` chip next to such measures and keep the selection in tab memory, per surface (one chip per chart in canvas).
AdityaHegde
self-requested a review
October 20, 2026 05:41
AdityaHegde
reviewed
Oct 20, 2026
AdityaHegde
left a comment
Collaborator
There was a problem hiding this comment.
High level review, just one comment about executor code.
| return nil, err | ||
| } | ||
|
|
||
| exactMeasures, err := e.resolveExactMeasures(qry) |
Collaborator
There was a problem hiding this comment.
Instead of passing around exact measures everywhere how about running a rewrite at once place? Not sure if there is a good path for this.
- match the Connect `MetricsViewAggregation` endpoint instead of the REST path - give the `publishers` measure a deterministic default expression - rename the fixture to `AdBids_precision_metrics` so that it sorts after `AdBids_metrics` and does not become the canvas editor's default metrics view
…measures # Conflicts: # proto/gen/rill/runtime/v1/resources.pb.go
This branch has not been deployed
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.
Measures can define an
exact_expressionnext to their approximateexpression, and dashboards let viewers switch a measure to its exact value on demand.exact_expressionon measures (parsed, validated, in the reference docs);exactonMetricsViewAggregationMeasureandexact_measure_namesonMetricsViewTimeSeriesRequest. The executor resolves the exact set once per query (closure over referenced measures) and passes it to every rewrite and AST; rollups are skipped for exact queries;rill.metrics.exact_measuresis a kill switch. The AIquery_metrics_viewtool exposes the flag.≈/=chip next to measures with an exact variant on big numbers, leaderboard and dimension table headers, the TDD header and table, and pivot column headers. A chip switches its own surface only (the big-number row, one leaderboard, the dimension table, the TDD table or the pivot). The selection is tab memory, never written to the URL, and resets when filters, time controls or the view change. One-shot exports follow what is on screen.exact_expressionin the measures reference, a guide page for the chip, and the canvas widget docs.AdBids_exact_metricsfixture.Checklist: