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

AfterShip / clickhouse-sql-parser / 44685796488

20 Nov 2026 06:08AM UTC coverage: 58.672% (+0.07%) from 58.607%
44685796488

Pull #347

github

git-hulk
Parse ClickHouse heredocs as string literals

The lexer treated a leading `$` as the start of an identifier, so the
AST could describe clauses that ClickHouse reads as string content.

For `SELECT $x$ AS a FROM t WHERE b = $x$`, the parser reported a table
and a filter. ClickHouse returns the single string `' AS a FROM t WHERE b = '`.

Recognize matching heredoc delimiters using the ClickHouse 26.x tag
rules. Format the body as a single-quoted literal, escaping quotes and
backslashes to preserve its value. Identifiers such as `service$$name`
and `a$b` still parse as before. The new AST and formatting fixtures
cover both reported queries.

Fixes #346

Assistant-By gpt-6.2-astra
Pull Request #347: Parse ClickHouse heredocs as string literals

59 of 59 new or added lines in 4 files covered. (100.0%)

143 existing lines in 4 files now uncovered.

10859 of 18508 relevant lines covered (58.67%)

3873.91 hits per line

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

90.86
/parser/format.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