Repository navigation
Conversation
Contributor
|
Preview root: https://posit-dev.github.io/commons/pr-443/ Python site preview: https://posit-dev.github.io/commons/pr-443/py/ Built from the latest commit on this branch. The R links in it point at the published R site, which no pull request rebuilds. |
jat255
force-pushed
the
jat255/438-quote-lowercase-tables
branch
from
October 22, 2026 02:46
d41e26b to
af62e71
Compare
EngineBackend.quote() used the preparer's quote() and quote_schema(), which leave an all-lowercase name bare because SQLAlchemy treats it as case-insensitive. Snowflake folds a bare name to upper case, so a table created as "survey" was looked up as SURVEY and every query against it failed. quote_identifier() quotes each component as written, as the R package's dbQuoteIdentifier() does. A lowercase name typed for an upper-case table on Snowflake or Oracle now has to be typed as stored, which is already the case in R. Closes #438
jat255
force-pushed
the
jat255/438-quote-lowercase-tables
branch
from
October 23, 2026 22:23
af62e71 to
29bece0
Compare
jat255
added this pull request to stack #454
October 23, 2026 22:25
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #438
This PR makes the Python package quote every part of a table name that it sends to a SQLAlchemy engine. An all-lowercase name was left bare, so on Snowflake a table created as
"survey"was looked up asSURVEY.Details (agent-written)
EngineBackend.quote()now usesquote_identifier()for each part. SQLAlchemy'squote()treats an all-lowercase name as case-insensitive and leaves it bare.Behavior change: on Snowflake (and Oracle), a Python user who types
tables="orders"for a table stored asORDERSnow has to typeORDERS. The R package already behaves this way, becauseDBI::dbQuoteIdentifier()always quotes. Mixed-case names were already quoted, so they do not change.Testing: the full Python suite passes, with two new tests for a lowercase name on SQLite and on the Snowflake dialect. On live Snowflake, the describe test in #434 passes with this fix.
Kata: whhh.