Skip to content

Conversation

@Lance726
Copy link
Collaborator

No description provided.

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

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 Coverage Status
Change from base Build 21271794233: 0.01%
Covered Lines: 8037
Relevant Lines: 15645

💛 - Coveralls

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 Lance726 requested a review from git-hulk January 23, 2026 08:56
@git-hulk git-hulk merged commit b13080f into AfterShip:master Jan 23, 2026
7 checks passed
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.

3 participants