Skip to content

Snowflake: Support ALTER TABLE ADD COLUMN IF NOT EXISTS - #2639

Draft
sabir-akhadov-localstack wants to merge 3 commits into
apache:mainfrom
localstack:pr/10-add-column-if-not-exists
Draft

sabir-akhadov-localstack wants to merge 3 commits into
apache:mainfrom
localstack:pr/10-add-column-if-not-exists

Conversation

@sabir-akhadov-localstack

Copy link
Copy Markdown
Contributor

Snowflake supports IF NOT EXISTS on ALTER TABLE ... ADD [COLUMN] (docs), but this failed to parse with SnowflakeDialect:

ALTER TABLE tab ADD COLUMN IF NOT EXISTS c TEXT

The check was a hardcoded dialect_of!(PostgreSql | BigQuery | DuckDb | Generic). This replaces it with a new Dialect::supports_add_column_if_not_exists() method, enables it for those dialects plus Snowflake, and switches the existing common test to all_dialects_where.

Co-Authored-By: Przemyslaw Denkiewicz <przemyslaw.denkiewicz@localstack.cloud>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codecov-commenter

codecov-commenter commented Oct 15, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.20%. Comparing base (5d653a2) to head (4087bc8).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2639      +/-   ##
==========================================
+ Coverage   81.16%   81.20%   +0.04%     
==========================================
  Files          42       42              
  Lines       33769    33890     +121     
  Branches    33769    33890     +121     
==========================================
+ Hits        27408    27520     +112     
+ Misses       2797     2796       -1     
- Partials     3564     3574      +10     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants