• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In
You are now the owner of this repo.

AfterShip / clickhouse-sql-parser
53%

Build:
DEFAULT BRANCH: master
Repo Added 22 Sep 2023 10:13AM UTC
Token F4x2H6fmkWoZPkof5HTWcZ5HSIXKiqDLa regen
Build 487 Last
Files 17
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

LAST BUILD ON BRANCH master
branch: SELECT
CHANGE BRANCH
x
Sync Branches
  • No branch selected
  • 14-2
  • add-benchmarks
  • add-coverall
  • add-modify-ttl
  • add-more-badges
  • add-valid-until-clause
  • ajruckman_alter_table_delete_where
  • ajruckman_placeholder_and_select_fix
  • alert-autofix-1
  • allow-string-as-tablename
  • allow-var-start-with-dollar
  • alter-role-settings
  • alter-table-drop-detached
  • case-statement-when-spacing
  • change-sql-string-to-compact
  • claude/frosty-wiles-784a80
  • claude/issue-184-20250827-0341
  • claude/romantic-kowalevski-5a7ec1
  • codec-delta-level
  • copilot/add-beautify-format-alter-role
  • copilot/add-beautify-format-for-create-user
  • copilot/add-beautify-format-instruction
  • copilot/add-beautify-format-support
  • copilot/add-ident-break-for-insert
  • copilot/add-ident-break-for-settings
  • copilot/add-ident-break-from-expression
  • copilot/add-ident-break-on-cluster
  • copilot/add-support-in-partition-expression
  • copilot/fix-12
  • copilot/fix-140
  • copilot/fix-179
  • copilot/fix-181
  • copilot/fix-187
  • copilot/fix-75186bce-1dd8-4e67-bcd7-685469aa2574
  • copilot/fix-e5e3e050-4a0c-4226-8f60-806cafedacba
  • copilot/fix-stderr-routing-issue
  • copilot/refactor-formatter-chaining-methods
  • copilot/update-tool-version-to-0417
  • dev
  • dev1
  • distinct-on
  • feat/add-order-by-with-fill-support
  • feat/alter_modify_query_support
  • feat_support_db_comment
  • feature/access-tuple-with-index
  • feature/add-projection
  • feature/add-union-distinct
  • feature/adjust_engineExpr_String_printing_order
  • feature/allow-select-modifier
  • feature/alter-table-replace
  • feature/check-expression
  • feature/clear-projection-statement
  • feature/column-def-alias-materialized
  • feature/create-function
  • feature/create-or-replace
  • feature/create-role
  • feature/delete-from
  • feature/drop-projection
  • feature/drop-user-role
  • feature/grant-privilege
  • feature/grouping-sets
  • feature/insert-expr
  • feature/insert-with-type-column
  • feature/materialize-index-and-projection
  • feature/optimize-expression
  • feature/query-parameter
  • feature/rename-table
  • feature/select-in-function
  • feature/support-json-type-skip
  • feature/support-placeholder
  • feature/support-ttl-policy
  • feature/support-tuple
  • feature/timestamp-interval
  • fix-array-join-take-2
  • fix-bugs-1
  • fix-cannot-parse-join-only
  • fix-database-column-name
  • fix-describe-table
  • fix-materialized-bug
  • fix-no-as-alias
  • fix-order-by-panic
  • fix-panic-in-eof-error
  • fix-select-limit-add-select-final
  • fix/allow-parameters-for-null-engine
  • fix/ast-walker
  • fix/between-expr
  • fix/between-visitor
  • fix/cast-expr
  • fix/column-alias-string
  • fix/distinct-keyword-preservation
  • fix/distinct-on-dot-notation
  • fix/dollar-sign
  • fix/dont_stop_walk_nil
  • fix/double-quote-as-ident
  • fix/group-by-column-with-keyworld
  • fix/insert-into
  • fix/issue-118
  • fix/issue-176
  • fix/issue-187
  • fix/issue-222
  • fix/issues-108
  • fix/keyword-as-column-in-select
  • fix/keyword_alias
  • fix/lexer-unterminated-comment-hang
  • fix/modify-ttl
  • fix/multi-join
  • fix/multi-line-comments
  • fix/multi_distinct_except
  • fix/nil-deref-error-formatting
  • fix/npe-unexpected-token
  • fix/panic-invalid-sql
  • fix/parse-comment-literal
  • fix/readme
  • fix/remove-extra-leading-space
  • fix/select-as-query
  • fix/select-issues
  • fix/string-as-table-ident
  • fix/table-visitor
  • fix/union-all
  • fix/walk_when_node
  • fix/when_case_then
  • fix/window_clause
  • fix/wraperror-index-out-of-range
  • fix/wrong-unary-expr-string
  • ft-enhance-json-options
  • improve-lexer
  • improve-rename-syntax
  • improve/parse-expr
  • issue-204
  • issue-23
  • json-type-hints
  • lexer-naming
  • lexer-string-escapes
  • master
  • minor-refactor-column-type
  • project-group-or-order
  • public-api-additions
  • refactor/allow-to-use-precedence
  • refactor/expect-token-kind
  • refactor/operation-name
  • replicated-database-fix
  • reserved-keyword-split
  • role/alter
  • role/on-cluster-expr
  • select-format
  • select-with-left-join
  • settings-bool-parser
  • sharad/add-comment-support-to-create-view
  • sharad/bug_fix
  • sharad/codec_parser
  • sharad/codec_parser_v3
  • sharad/delta_number_literal
  • sharad/dictionary_v1
  • sharad/fix-mv-comment-before-as
  • sharad/fix-rmv-column-list-engine
  • sharad/mv_definer
  • sharad/named_parameter_v1
  • sharad/table_comment
  • structured-parse-errors
  • support-concat-operator
  • support-multiple-array-joins
  • support-nested-tuple-definitions
  • support-offset-without-limit
  • support-refresh-in-mv
  • support/table-alias-without-as
  • swgillespie/alter-table-segv
  • swgillespie/clickhouse-remotesecure
  • test-automation
  • traversal-drift-test
  • unify-sql-terms
  • update-readme

14 Jun 2026 03:39AM UTC coverage: 52.748%. Remained the same
27487335859

push

github

web-flow
Rename lexer state to match what it holds (#277)

l.lastToken and p.last() actually hold the *current* lookahead token -
the one the parser is looking at but has not consumed - not a
previously-consumed token. Likewise l.current held the input byte
offset, not a token. Rename for accuracy, no behavior change:

- lexerState.current (int)    -> offset
- lexerState.lastToken        -> current
- Parser.last()               -> cur()
- Parser.lastTokenKind()      -> curTokenKind()
- Parser.lastTokenString()    -> curTokenString()
- local `lastToken` vars      -> curToken (parser files)

The one genuinely-previous token - the local in Lexer.consumeToken used
to disambiguate unary +/- - is named prevToken.

Also give TokenKindDot its missing TokenKind type annotation.
---------

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

160 of 231 new or added lines in 8 files covered. (69.26%)

1 existing line in 1 file now uncovered.

8495 of 16105 relevant lines covered (52.75%)

2997.35 hits per line

Relevant lines Covered
Build:
Build:
16105 RELEVANT LINES 8495 COVERED LINES
2997.35 HITS PER LINE
Source Files on master
  • Tree
  • List 17
  • Changed 1
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line

Recent builds

Builds Branch Commit Type Ran Committer Via Coverage
27487335859 master Rename lexer state to match what it holds (#277) l.lastToken and p.last() actually hold the *current* lookahead token - the one the parser is looking at but has not consumed - not a previously-consumed token. Likewise l.current held the input byt... push 14 Jun 2026 03:40AM UTC web-flow github
52.75
27412326397 lexer-naming Spell out current-token names: current(), currentTokenKind, currentToken Per review: prefer full words over the cur abbreviation. - Parser.cur() -> current() - Parser.curTokenKind() -> currentTokenKind() - Parser.curTokenString() ->... Pull #277 12 Jun 2026 11:18AM UTC git-hulk github
52.75
27411228284 master Add drift test keeping ASTVisitor and Walk traversals in sync (#276) Accept/ASTVisitor and Walk/WalkFunc are two independent traversal engines that encode every node's children separately, so a new AST node type added to one can silently be missi... push 12 Jun 2026 10:54AM UTC web-flow github
52.75
27322213549 reserved-keyword-split Make matchTokenKind variadic, drop kindClass bit set matchTokenKind(TokenKindIdent, TokenKindKeyword) now expresses the ident-or-any-keyword membership check directly, so the kindClass bit set and matchTokenKindIn helper are no longer needed. Exi... Pull #275 11 Jun 2026 03:41AM UTC git-hulk github
52.2
27322013460 reserved-keyword-split Rename parseIdentAnyKeyword to parseAnyKeyword, add kindClass bit set TokenKind stays a string (its values are woven into the public AST and error messages), so multi-kind membership checks get an internal bit set instead: kindClass with classIde... Pull #275 11 Jun 2026 03:35AM UTC git-hulk github
52.21
27321336861 reserved-keyword-split Accept reserved keywords as bare OVER window references The WINDOW definition side accepted `WINDOW order AS (...)` but the unparenthesized reference `OVER order` still went through matchTokenKind(TokenKindIdent), which rejects reserved keywords.... Pull #275 11 Jun 2026 03:15AM UTC git-hulk github
52.18
27321212730 public-api-additions Add ParseStmt, ParseExpr and FormatBeautify convenience API - ParseStmt(sql) parses exactly one statement, erroring on zero or multiple statements, so callers no longer need to go through NewParser(...).ParseStmts() and validate the slice len... Pull #278 11 Jun 2026 03:11AM UTC git-hulk github
52.13
27321031285 lexer-naming Rename lexer state to match what it holds l.lastToken and p.last() actually hold the *current* lookahead token - the one the parser is looking at but has not consumed - not a previously-consumed token. Likewise l.current held the input byte offse... Pull #277 11 Jun 2026 03:06AM UTC git-hulk github
52.01
27320812685 traversal-drift-test Add drift test keeping ASTVisitor and Walk traversals in sync Accept/ASTVisitor and Walk/WalkFunc are two independent traversal engines that encode every node's children separately, so a new AST node type added to one can silently be missing from... Pull #276 11 Jun 2026 03:00AM UTC git-hulk github
52.75
27320667213 reserved-keyword-split 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 key... Pull #275 11 Jun 2026 02:56AM UTC git-hulk github
52.17
See All Builds (487)

Badge your Repo: clickhouse-sql-parser

We detected this repo isn’t badged! Grab the embed code to the right, add it to your repo to show off your code coverage, and when the badge is live hit the refresh button to remove this message.

Could not find badge in README.

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

Refresh
  • Settings
  • Repo on GitHub
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