SNOW-1871392: Quoting changes for column names starting with _
#565
Labels
bug
Something isn't working
status-triage_done
Initial triage done, will be further handled by the driver team
Please answer these questions before submitting your issue. Thanks!
What version of Python are you using? 3.12
What operating system and processor architecture are you using? osx-arm64
What are the component versions in the environment (
pip freeze
)? Main component: snowflake-sqlalchemy 1.7.2What did you do?
We have sqlalchemy code that uses constructs like
some_expression.label("_column0")
, i.e. it selects columns "as" an identifier that starts with an underscore.What did you expect to see?
So far (with smaller versions of snowflake-sqlalchemy), no quoting would be used when compiling these identifier names, effectively upper-casing these column names. This is what I expect to see.
Now, as a result of mraba/underscore_column_id: use
_
as column identifier #538, quoting is used. No upper-casing is done and the effective column names used by snowflake are no longer as expected, since snowflake sees a quoted name now and no longer does implicit uppercase conversion.This breaks many of our queries that worked just fine until 1.7.1 and is a blocker to upgrade. I don't see any clear workaround, I think #538 should be reverted.
To reproduce:
For snowflake-sqlalchemy 1.7.1, the output is:
For snowflake-sqlalchemy 1.7.2, the output is:
The text was updated successfully, but these errors were encountered: