FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Add support for SETTINGS clause in ALTER TABLE ADD COLUMN by Lance726 · Pull Request #232 · AfterShip/clickhouse-sql-parser · GitHub

Add support for SETTINGS clause in ALTER TABLE ADD COLUMN - #232

Merged
git-hulk merged 1 commit into
AfterShip:masterfrom
Lance726:fix-bugs-1
Jan 23, 2026
Merged

Add support for SETTINGS clause in ALTER TABLE ADD COLUMN#232
git-hulk merged 1 commit into
AfterShip:masterfrom
Lance726:fix-bugs-1

Conversation

Copy link
Copy Markdown
Collaborator

No description provided.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

Copy link
Copy Markdown

Pull Request Test Coverage Report for Build 21280275069

Details

  • 15 of 23 (65.22%) changed or added relevant lines in 3 files are covered.
  • 2 unchanged lines in 1 file lost coverage.
  • Overall coverage increased (+0.01%) to 51.371%

Changes Missing Coverage Covered Lines Changed/Added Lines %
parser/parser_alter.go 6 8 75.0%
parser/walk.go 1 3 33.33%
parser/ast.go 8 12 66.67%
Files with Coverage Reduction New Missed Lines %
parser/ast.go 2 40.62%
Totals
Change from base Build 21271794233: 0.01%
Covered Lines: 8037
Relevant Lines: 15645

💛 - Coveralls

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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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 Settings field to the AlterTableAddColumn AST 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.

Lance726 requested a review from git-hulk January 23, 2026 08:56
git-hulk merged commit b13080f into AfterShip:master Jan 23, 2026
7 checks passed
orian referenced this pull request in orian/clickhouse-sql-parser May 13, 2026
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants


Back | FazBrowse Home | New Git URL