-
Notifications
You must be signed in to change notification settings - Fork 14.5k
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): calculated column cannot orderby in BigQuery #17196
Conversation
7eaa648
to
d5afc18
Compare
Codecov Report
@@ Coverage Diff @@
## master #17196 +/- ##
==========================================
- Coverage 76.93% 76.72% -0.21%
==========================================
Files 1039 1039
Lines 55585 55592 +7
Branches 7578 7578
==========================================
- Hits 42766 42655 -111
- Misses 12569 12687 +118
Partials 250 250
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
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.
Oh man, this is definitely a bug in the BQ query engine 🤦 This workaround should IMO preferably be placed in the BQ SQLA dialect. I wonder if we should open a ticket there to get this fixed upstream, i.e. have the dialect ensure that the alias is used instead of the full expression? In the meantime this is a great workaround, thanks for fixing! Tested to work as expected, LGTM!
This is awesome! Thank you! |
🏷️ 2021.42 |
SUMMARY
closed: #17178
Calculated column cannot use in native filter when using Google BigQuery. This is due to the column in
ORDER BY
must be inSELECT
clause orGROUP BY
clause.added a new class property
allows_hidden_cc_in_orderby
inBaseEngineSpec
to fix this error.a calculated column in orderby
TESTING INSTRUCTIONS
Test this PR follow this issue: #17178
ADDITIONAL INFORMATION