Add support for SETTINGS clause in ALTER TABLE ADD COLUMN#232
Merged
git-hulk merged 1 commit intoAfterShip:masterfrom Jan 23, 2026
Merged
Add support for SETTINGS clause in ALTER TABLE ADD COLUMN#232git-hulk merged 1 commit intoAfterShip:masterfrom
git-hulk merged 1 commit intoAfterShip:masterfrom
Conversation
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Pull Request Test Coverage Report for Build 21280275069Details
💛 - Coveralls |
There was a problem hiding this comment.
Pull request overview
This PR adds support for the SETTINGS clause in ALTER TABLE ADD COLUMN statements, allowing users to specify settings like alter_sync when adding columns to tables in ClickHouse.
Changes:
- Added
Settingsfield to theAlterTableAddColumnAST node structure - Implemented parsing logic for the SETTINGS clause in ALTER TABLE ADD COLUMN statements
- Updated AST walker to traverse the Settings field
- Added test cases demonstrating the new SETTINGS clause functionality
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| parser/ast.go | Added Settings field to AlterTableAddColumn struct and updated End(), String(), and Accept() methods to handle the new field |
| parser/parser_alter.go | Added parsing logic for the SETTINGS clause in parseAlterTableAddColumn function |
| parser/walk.go | Added Settings field traversal in the Walk function for AlterTableAddColumn |
| parser/testdata/ddl/alter_table_add_column.sql | Updated test SQL to include SETTINGS clause with alter_sync setting |
| parser/testdata/ddl/format/alter_table_add_column.sql | Updated format test file to show origin and formatted SQL with SETTINGS clause |
| parser/testdata/ddl/output/alter_table_add_column.sql.golden.json | Updated golden JSON output to include Settings field structure |
| parser/testdata/dml/output/alter_table_with_comment.sql.golden.json | Updated golden JSON to include Settings field (set to null for cases without SETTINGS clause) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
git-hulk
approved these changes
Jan 23, 2026
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.
No description provided.