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

AfterShip / clickhouse-sql-parser / 30468832682

29 Jul 2026 04:02PM UTC coverage: 54.513% (+0.2%) from 54.268%
30468832682

Pull #290

github

therealpandey
Keep argument aliases and parametric lists on the keyword path

The keyword-argument parser parsed each argument with parseExpr, losing three
things parseColumnExprListWithLParen does on the path it replaces. Because every
call to these four functions is routed through it, plain comma calls lost them
too:

- an optional `AS <alias>` per argument, so `trim('x' AS y)` and
  `substring('h' AS s, 2)` stopped parsing although ClickHouse accepts them
- a leading DISTINCT
- a trailing parametric argument list

Also drop the fixture and assertion for `trim(both)` and `trim(both, x)`:
ClickHouse rejects both, because its trim grammar always reads BOTH as the
modifier, so they were the wrong thing to pin. BOTH as an ordinary name is still
covered through max(both) and an alias.

Reuse parseOneStmt from position_test.go rather than a second copy of it.
Pull Request #290: Support SQL-standard keyword arguments for trim, substring and overlay

111 of 129 new or added lines in 2 files covered. (86.05%)

550 existing lines in 2 files now uncovered.

9042 of 16587 relevant lines covered (54.51%)

3075.48 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

77.87
/parser/parser_column.go


Source Not Available

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