Repository navigation
fix(dashboard): ignore time grain filters on metric-only semantic charts - #46331
Closed
mikebridge wants to merge 2 commits into
Closed
mikebridge wants to merge 2 commits into
mikebridge wants to merge 2 commits into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #46331 +/- ##
==========================================
+ Coverage 85.44% 85.46% +0.01%
==========================================
Files 3101 3101
Lines 213763 213824 +61
Branches 50459 50491 +32
==========================================
+ Hits 182660 182737 +77
+ Misses 27677 27661 -16
Partials 3426 3426
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Member
Author
|
Closing in favour of #46339, which handles this in the backend: a time grain that cannot apply (a field that is not a date, or no date grouped at all) is now ignored for semantic views, as it already is for datasets. That covers the metric-only and table cases this PR addressed, and also grouped charts such as bar, line and pie, which this PR did not. |
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.
SUMMARY
TL;DR: Keep semantic-view Big Number charts rendering when a dashboard Time grain filter or display control selects a duration but the chart has no grouping columns.
Background: Dashboard time-grain settings can apply to several charts at once. Table and Interactive Table already omit a grain when their grouped columns are known not to be dates.
Problem: A metric-only semantic chart can receive a grain without a time dimension and fail with “A time column must be specified when a time grain is provided.”
What this changes: Apply the existing conservative rule in the shared semantic query builder. Charts with no grouping columns ignore the irrelevant grain, while Table and Interactive Table retain their existing behavior for known non-date groupings. Metrics and time-range filters are preserved. Ordinary SQL datasets are unchanged.
Scope and limits
Technical details
omitDormantTimeGraininto core query utilities and keep the existing chart-controls export as a compatibility re-export.BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
No browser check has been done on this PR, and no screenshot is available.
TESTING INSTRUCTIONS
Automated validation: 560 tests passed across 50 affected query-builder and dashboard suites. Changed-file hooks passed, including frontend TypeScript. Regression coverage exercises native filters and display controls on metric-only charts, active/unknown temporal selections, raw queries, and ordinary datasets. Removing the common normalization call reproduces the regression.
Manual verification (not yet run on this PR):
ADDITIONAL INFORMATION
SEMANTIC_LAYERSflag