-
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: quote column name if db requires #15465
fix: quote column name if db requires #15465
Conversation
These changes will also affect db2, hana, and oracle which I haven't tested. I'd be grateful if someone could test another db that has access to one or more of them. |
8093198
to
629d5dc
Compare
Codecov Report
@@ Coverage Diff @@
## master #15465 +/- ##
==========================================
- Coverage 76.97% 76.92% -0.05%
==========================================
Files 976 974 -2
Lines 51260 50511 -749
Branches 6900 6494 -406
==========================================
- Hits 39456 38857 -599
+ Misses 11585 11449 -136
+ Partials 219 205 -14
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
629d5dc
to
a9c6b92
Compare
a9c6b92
to
b6517d8
Compare
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 great! I pinged #debug-together asking for people who might be able to test in the other DBs, but I wouldn't hold my breath.
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.
@eschutho did you make sure this also works with physical tables? If memory serves me well, I believe this problem only currently affects virtual tables, and when I tried to fix the virtual table problem, it broke physical tables. So just to be sure, it would be nice to test that this also works on physical tables with all lowercase, all uppercase and mixed case column names.
We were able to repro on a physical table before this fix. I did some additional testing of this with physical and virtual tables, and lower/upper/mixed case column aliases, it was looking good in all those cases :) |
This reverts commit 80b8df0.
Co-authored-by: hughhhh <hughmil3s@gmail.com>
This reverts commit 80b8df0.
Co-authored-by: hughhhh <hughmil3s@gmail.com>
This reverts commit 80b8df0.
Co-authored-by: hughhhh <hughmil3s@gmail.com>
This reverts commit 4986f97.
SUMMARY
We were seeing some issues when using Snowflake with column aliases in quotes. When creating the dataset, the outer select statement was quoting the alias/label but not the column name. Snowflake in particular requires that if the original query column name is quoted then any reference to it must also be quoted.
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Before with quotes (snowflake)

Before without quotes (snowflake):

After with quotes (snowflake):


After without quotes (snowflake):


TESTING INSTRUCTIONS
ADDITIONAL INFORMATION