Skip to content

fix(snowflake): use RENAME COLUMN instead of MySQL CHANGE COLUMN - #2186

Closed
Aias00 wants to merge 1 commit into
OtterMind:mainfrom
Aias00:fix/2183-snowflake-rename-column
Closed

fix(snowflake): use RENAME COLUMN instead of MySQL CHANGE COLUMN#2186
Aias00 wants to merge 1 commit into
OtterMind:mainfrom
Aias00:fix/2183-snowflake-rename-column

Conversation

@Aias00

@Aias00 Aias00 commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

Related issue

Closes #2183

Summary

SnowflakeColumnTypeEnum.buildModifyColumn emitted CHANGE COLUMN old new for column rename — CHANGE COLUMN is MySQL-specific syntax that Snowflake does not support. Changed to RENAME COLUMN "old" TO "new" (valid Snowflake syntax with quoted identifiers for mixed-case names).

Verification

  • mvn compile -> BUILD SUCCESS.

Contributor declaration

  • I linked the Issue that defines this change.
  • I tested the affected behavior and reported the actual results above.
  • I did not include credentials, private data, or generated build output.
  • I disclosed substantial AI assistance below, or this PR contains no substantial AI-generated code.

AI assistance: The fix, verification, and PR description were produced with Claude Code assistance.

CHANGE COLUMN is MySQL-specific syntax that Snowflake does not support.
Use RENAME COLUMN "old" TO "new" (valid Snowflake, with quoted
identifiers for mixed-case names).

Fixes OtterMind#2183

Co-Authored-By: Claude <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 26, 2026 15:08
@Aias00
Aias00 requested a review from openai0229 as a code owner July 26, 2026 15:08

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@Aias00

Aias00 commented Jul 27, 2026

Copy link
Copy Markdown
Contributor Author

Closing in favor of #2262 which uses the SPI quoteIdentifierAlways method per the maintainer review on #2187.

@Aias00 Aias00 closed this Jul 27, 2026
@openai0229 openai0229 moved this from In Review to Done in Chat2DB Community Jul 27, 2026
Aias00 added a commit to Aias00/Chat2DB that referenced this pull request Jul 27, 2026
…ENAME

Replaces direct " concatenation with
SnowflakeMetaData.SNOWFLAKE_SQL_IDENTIFIER_PROCESSOR.quoteIdentifierAlways
for DROP COLUMN, CREATE TABLE schema qualifier, and RENAME COLUMN.
CHANGE COLUMN (MySQL syntax) is replaced with RENAME COLUMN (Snowflake).
Built on the SPI extension (OtterMind#2234).

Closes OtterMind#2169, OtterMind#2185, OtterMind#2186 (superseded by this SPI-based approach)

Co-Authored-By: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Snowflake column rename uses MySQL CHANGE COLUMN syntax (invalid Snowflake SQL)

3 participants