fix(snowflake): use SPI quoteIdentifierAlways for DROP, schema, and RENAME - #2262
Merged
openai0229 merged 1 commit intoJul 30, 2026
Merged
Conversation
This was referenced Jul 27, 2026
Aias00
force-pushed
the
rework/snowflake-quoting-via-spi
branch
from
July 27, 2026 16:09
44cb9cb to
3d12ed2
Compare
3 tasks
openai0229
requested changes
Jul 28, 2026
openai0229
left a comment
Contributor
There was a problem hiding this comment.
This remains blocked on PR 2234 and is not complete against the requested identifier-processing contract. SnowflakeSqlBuilder still directly wraps table.getName with double quotes while only the schema goes through the processor, so embedded quotes in the table name remain unsafe. PostgreSQL verification also does not validate Snowflake syntax. After 2234 is resolved, rebase and add Snowflake generated-DDL tests for CREATE TABLE schema and table, DROP COLUMN, and RENAME COLUMN, including mixed case and embedded double quotes.
openai0229
force-pushed
the
rework/snowflake-quoting-via-spi
branch
from
July 30, 2026 00:45
3d12ed2 to
0a1059d
Compare
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.
Summary
Consolidates the three Snowflake quoting PRs (#2169, #2185, #2186) into one SPI-based rework, per the maintainer's review on #2187. All identifier quoting now goes through
SnowflakeMetaData.SNOWFLAKE_SQL_IDENTIFIER_PROCESSOR.quoteIdentifierAlways()instead of direct"concatenation.Changes
DROP COLUMN (
SnowflakeColumnTypeEnum.java):SQL_DROP_COLUMN + tableColumn.getName()→SQL_DROP_COLUMN + processor.quoteIdentifierAlways(tableColumn.getName()). The constant stays"DROP COLUMN "(no delimiter — the processor handles quoting).CREATE TABLE schema (
SnowflakeSqlBuilder.java):table.getSchemaName()(raw) →processor.quoteIdentifierAlways(table.getSchemaName()). The table name was already double-quoted; now the schema matches.RENAME COLUMN (
SnowflakeColumnTypeEnum.java):CHANGE COLUMN old new <type>(MySQL syntax, unquoted) →RENAME COLUMN processor.quoteIdentifierAlways(old) TO processor.quoteIdentifierAlways(new)(valid Snowflake syntax, quoted).Built on the SPI extension #2234.
Verification
mvn compile-> BUILD SUCCESS (on the SPI extension branch)Contributor declaration
AI assistance: The fix, verification, and PR description were produced with Claude Code assistance.