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

AfterShip / clickhouse-sql-parser / 28727616055
53%
master: 54%

Build:
Build:
LAST BUILD BRANCH: codex/fix-semantic-traversal
DEFAULT BRANCH: master
Ran 05 Jul 2026 03:01AM 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

05 Jul 2026 02:59AM UTC coverage: 53.265% (+0.3%) from 52.962%
28727616055

Pull #283

github

git-hulk
Fix position tracking across ratio, IS NULL, GROUP BY, ALTER and dictionary nodes

Positions are stamped from caller-supplied `pos` parameters or read
after the relevant token was already consumed, producing wrong or
overlapping spans in several nodes:

- parseRatioExpr passed the numerator's pos to the denominator too, so
  `SAMPLE 1/2` produced two literals with the same NumPos and
  overlapping spans. The denominator now starts at its own token.
- SELECT ... WITH TOTALS set statementEnd to the position of WITH,
  captured before consuming it. It now ends at the TOTALS token.
- GroupByClause.GroupByEnd was set to p.Pos() after the clause - the
  START of the next token - so the span swallowed trailing whitespace.
  It now ends at the last token of the clause (expression, ALL, or the
  WITH CUBE/ROLLUP/TOTALS keyword).
- The ALTER TABLE ... DETACH branch consumed the keyword before taking
  p.Pos(), unlike all 12 sibling branches, so the clause's Pos pointed
  at PARTITION. It now points at DETACH.
- IsNullExpr/IsNotNullExpr stamped IsPos with the position AFTER the
  consumed NULL (the next token's start) and their End() stopped at the
  operand, excluding "IS [NOT] NULL" entirely. IsPos is now the IS
  keyword, a new NullEnd field marks the end of NULL, Pos() starts at
  the operand and End() returns NullEnd.
- DictionaryAttribute.End() returned NamePos + len("IS_OBJECT_ID")
  and friends - the attribute NAME's start plus a keyword length,
  landing mid-token for any realistic name/type. A new AttrEnd field
  tracks the real end of the last property.
- AlterTableDropPartition.End() computed a.Settings.End() and discarded
  the result (missing return), excluding the SETTINGS clause from the
  span.

Golden JSON diffs are exclusively position-field values plus the two
new fields (NullEnd, AttrEnd); no format output changed. Span
assertions live in the new position_test.go.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Pull Request #283: Fix position tracking across ratio, IS NULL, GROUP BY, ALTER and dictionary nodes

43 of 46 new or added lines in 6 files covered. (93.48%)

5 existing lines in 1 file now uncovered.

8631 of 16204 relevant lines covered (53.26%)

3026.09 hits per line

Uncovered Changes

Lines Coverage ∆ File
2
75.63
0.27% parser/parser_query.go
1
76.88
0.11% parser/parser_column.go

Coverage Regressions

Lines Coverage ∆ File
5
76.88
0.11% parser/parser_column.go
Jobs
ID Job ID Ran Files Coverage
1 28727616055.1 05 Jul 2026 03:01AM UTC 17
53.26
GitHub Action Run
Source Files on build 28727616055
  • Tree
  • List 17
  • Changed 6
  • Source Changed 0
  • Coverage Changed 6
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Pull Request #283
  • PR Base - master (#28727330514)
  • 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