-
Notifications
You must be signed in to change notification settings - Fork 348
fix: Ensure displayed configs match queried configs in chart explorer #1527
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
fix: Ensure displayed configs match queried configs in chart explorer #1527
Conversation
🦋 Changeset detectedLatest commit: 18d3916 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Code Review✅ No critical issues found. The refactoring successfully centralizes config transformations to ensure displayed SQL/MV indicators match queried configs. The changes are well-tested and follow existing patterns. Minor observations:
The PR is ready to merge. |
E2E Test Results✅ All tests passed • 55 passed • 4 skipped • 724s
Tests ran across 4 shards in parallel. |
c9c4b97 to
bd559f1
Compare
bd559f1 to
6979693
Compare
6979693 to
f74deaf
Compare
| config={{ | ||
| ...queriedConfig, | ||
| granularity: alert | ||
| ? intervalToGranularity(alert.interval) | ||
| : queriedConfig.granularity, | ||
| dateRange: alert | ||
| ? extendDateRangeToInterval( | ||
| queriedConfig.dateRange, | ||
| alert.interval, | ||
| ) | ||
| : queriedConfig.dateRange, | ||
| }} | ||
| config={dbTimeChartConfig} |
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.
Thank you for this wonderful performance improvement 🫡
Closes HDX-3089
Closes HDX-3083
Summary
This PR ensures that the Generated SQL and Materialized View Explanations are generated for the same config that is queried.
Previously, this was not the case because child components (eg. DBTableChart, DBTimeChart, DBNumberChart) would transform the config passed down by DBEditTimeChart or Dashboard.Tile. Now, the same transformations are applied at the parent component.
Demo
Table Tile MV Indicator now correctly ignores granularity
Note that the time chart tiles cannot use MVs because the granularity is too small, but the table tile can use the MV:
Number and Table Chart generated SQL is correct
Number Chart has no granularity, group, or order by:
Table Chart has implicit group by, limit, and order by applied: