-
Notifications
You must be signed in to change notification settings - Fork 13.9k
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: BigQuery cannot accept Time Grain #21489
Conversation
if (isPhysicalColumn(xAxisValue) && Array.isArray(xAxis?.options)) { | ||
for (let i = 0; i < xAxis.options.length; i += 1) { | ||
if (xAxis.options[i].column_name === xAxisValue) { | ||
return !!xAxis.options[i].is_dttm; | ||
} | ||
} | ||
if (isPhysicalColumn(xAxisValue)) { | ||
return !!(xAxis?.options ?? []).find( | ||
(col: ColumnMeta) => col?.column_name === xAxisValue, | ||
)?.is_dttm; |
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.
bycatch: improve code smell
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.
Looks good, thanks!
Codecov Report
@@ Coverage Diff @@
## master #21489 +/- ##
=======================================
Coverage 66.67% 66.68%
=======================================
Files 1791 1791
Lines 68478 68477 -1
Branches 7271 7271
=======================================
Hits 45661 45661
+ Misses 20956 20955 -1
Partials 1861 1861
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
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.
LGTM, but curious to hear your thoughts on the proposed simplification.
Let me check where the whole codebase calls this argument. |
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.
Approving to unblock the fix and deferring potential refactor to follow-up PR
I will refactor |
(cherry picked from commit 33509ab)
SUMMARY
This PR fixes Time Grain in the BigQuery as datasource and FF
GENERIC_CHART_AXES
is enabled.BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
After
Before
TESTING INSTRUCTIONS
ADDITIONAL INFORMATION