• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

AfterShip / clickhouse-sql-parser / 34577527180
56%

Build:
DEFAULT BRANCH: master
Ran 11 Sep 2026 08:07AM UTC
Jobs 1
Files 17
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

11 Sep 2026 08:06AM UTC coverage: 56.321% (+0.03%) from 56.289%
34577527180

push

github

web-flow
Move ALTER TABLE SETTINGS to the statement level (#320)

SETTINGS on ALTER TABLE is a query-level clause: ClickHouse accepts it
once, after the last alter clause, and rejects it mid-statement.

  -- rejected by ClickHouse
  ALTER TABLE t ADD COLUMN c Int SETTINGS alter_sync = 2, DROP COLUMN b
  -- accepted by ClickHouse
  ALTER TABLE t ADD COLUMN c Int, DROP COLUMN b SETTINGS alter_sync = 2

It was instead parsed per clause, by ADD COLUMN, ADD INDEX, DETACH
PARTITION and DROP PARTITION only, so every other form failed to parse
even though ClickHouse accepts it:

  ALTER TABLE t MODIFY COLUMN a Int64 SETTINGS alter_sync = 2
  ALTER TABLE t DROP COLUMN b SETTINGS alter_sync = 2
  ALTER TABLE t ADD COLUMN c Int, DROP COLUMN b SETTINGS alter_sync = 2
  ALTER TABLE t MATERIALIZE INDEX IF EXISTS idx SETTINGS mutations_sync = 2

Parse it once in parseAlterTable instead, after the clause list, and
reject it mid-statement as ClickHouse does.

Formatted SQL is unchanged for the clauses that already accepted
SETTINGS: only the AST placement moves, so their format/ goldens do not
change.

Breaking AST change: AlterTableAddColumn.Settings,
AlterTableAddIndex.Settings, AlterTableDetachPartition.Settings and
AlterTableDropPartition.Settings are removed in favour of
AlterTable.Settings.

Every form above was verified against clickhouse-local 26.8.2.7, in both
directions: the SQL parses here, and this parser's formatted output is
accepted by ClickHouse.

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>

11 of 19 new or added lines in 4 files covered. (57.89%)

1 existing line in 1 file now uncovered.

9757 of 17324 relevant lines covered (56.32%)

4092.19 hits per line

Uncovered Changes

Lines Coverage ∆ File
4
18.09
0.01% parser/ast.go
2
73.29
0.14% parser/parser_alter.go
2
43.24
0.05% parser/walk.go

Coverage Regressions

Lines Coverage ∆ File
1
18.09
0.01% parser/ast.go
Jobs
ID Job ID Ran Files Coverage
1 34577527180.1 11 Sep 2026 08:07AM UTC 17
56.32
GitHub Action Run
Source Files on build 34577527180
  • Tree
  • List 17
  • Changed 4
  • Source Changed 0
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • ce5b8b38 on github
  • Prev Build on master (#34461582711)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc