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

AfterShip / clickhouse-sql-parser / 27320667213
52%
master: 53%

Build:
Build:
LAST BUILD BRANCH: lexer-naming
DEFAULT BRANCH: master
Ran 11 Jun 2026 02:56AM 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 Jun 2026 02:54AM UTC coverage: 52.169% (+0.2%) from 52.012%
27320667213

Pull #275

github

git-hulk
Split keywords into reserved and non-reserved sets

matchTokenKind previously coerced every keyword token to match
TokenKindIdent, so any keyword could silently fill an identifier slot.
A missing name before a clause keyword then swallowed the keyword
instead of erroring: `SELECT a FROM WHERE b = 1` parsed FROM as a bare
alias of `a`, `INSERT INTO SELECT 1` ate SELECT as a table name. This
over-acceptance is the root of the recurring keyword-as-identifier bug
class (#268, #269, #270).

Introduce reservedKeywords - statement starters, clause starters and
expression operators - and narrow the coercion in matchTokenKind to
non-reserved keywords only. Positions where context proves even a
reserved keyword is a name use the new parseIdentAnyKeyword:

- after AS (select-item and table aliases)
- after a dot in qualified names (`db.from`, `t.from`)
- lookahead-disambiguated select items from #269
- query parameters (`{end:UInt32}`)
- window names (`OVER (order)`, `WINDOW order AS (...)`)
- GRANT options (`WITH GRANT OPTION`)
- gated function names (select-item modifiers, INSERT INTO FUNCTION)

Non-reserved keywords (DATE, KEY, FIRST, IF, LEFT, ANY, ...) keep
working as identifiers everywhere, including keywords that double as
ClickHouse function or engine names.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Pull Request #275: Split keywords into reserved and non-reserved sets

52 of 58 new or added lines in 5 files covered. (89.66%)

398 existing lines in 2 files now uncovered.

8407 of 16115 relevant lines covered (52.17%)

2735.94 hits per line

Uncovered Changes

Lines Coverage ∆ File
6
83.19
-0.09% parser/parser_common.go

Coverage Regressions

Lines Coverage ∆ File
355
69.21
0.41% parser/parser_table.go
43
83.19
-0.09% parser/parser_common.go
Jobs
ID Job ID Ran Files Coverage
1 27320667213.1 11 Jun 2026 02:56AM UTC 17
52.17
GitHub Action Run
Source Files on build 27320667213
  • Tree
  • List 17
  • Changed 6
  • Source Changed 0
  • Coverage Changed 6
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Pull Request #275
  • PR Base - master (#27279412055)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc