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

AfterShip / clickhouse-sql-parser
52%

Build:
DEFAULT BRANCH: master
Repo Added 22 Sep 2023 10:13AM UTC
Token F4x2H6fmkWoZPkof5HTWcZ5HSIXKiqDLa regen
Build 468 Last
Files 15
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: master
CHANGE BRANCH
x
Reset
Sync Branches
  • master
  • 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/modify-ttl
  • fix/multi-join
  • fix/multi-line-comments
  • fix/multi_distinct_except
  • 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/wrong-unary-expr-string
  • ft-enhance-json-options
  • improve-lexer
  • improve-rename-syntax
  • improve/parse-expr
  • issue-204
  • issue-23
  • json-type-hints
  • lexer-string-escapes
  • minor-refactor-column-type
  • project-group-or-order
  • refactor/allow-to-use-precedence
  • refactor/expect-token-kind
  • refactor/operation-name
  • replicated-database-fix
  • 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
  • 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
  • unify-sql-terms
  • update-readme

15 May 2026 10:35AM UTC coverage: 51.662% (+0.04%) from 51.621%
25913331789

push

github

web-flow
Fix should allow column list before ENGINE and fix DEPENDS ON multi-table in CREATE MATERIALIZED VIEW (#270)

1. Column list before ENGINE (new):
   ClickHouse SHOW CREATE TABLE for refreshable materialized views with
   ENGINE (e.g. Memory) outputs the column list between REFRESH and ENGINE:

     CREATE MATERIALIZED VIEW db1.mv_name
     REFRESH EVERY 1 SECOND
     (col1 String, col2 Int8)
     ENGINE = Memory
     AS SELECT ...

   The parser previously expected TO or ENGINE immediately after REFRESH
   clauses. Added support for (columns) before ENGINE by parsing a
   TableSchemaClause when a left paren is encountered.

2. DEPENDS ON multi-table (bug fix):
   The comma in 'DEPENDS ON db1.mv_a, db1.mv_b' was not consumed before
   parsing the next table identifier. Added missing consumeToken() call
   in the comma loop, matching the pattern used in parser_query.go.

Changes:
- parser/parser_view.go: handle (columns) before ENGINE; consume comma in DEPENDS ON loop
- parser/ast.go: add TableSchema field to CreateMaterializedView
- parser/format.go: emit TableSchema before ENGINE in FormatSQL
- parser/walk.go: traverse TableSchema in Walk

Tests:
- create_materialized_view_rmv_engine_with_columns.sql (column list + ENGINE)
- create_materialized_view_rmv_depends_on_multi.sql (multi-table DEPENDS ON)
- All 21 MV syntax variants tested, all existing tests pass

16 of 28 new or added lines in 4 files covered. (57.14%)

8268 of 16004 relevant lines covered (51.66%)

3015.1 hits per line

Relevant lines Covered
Build:
Build:
16004 RELEVANT LINES 8268 COVERED LINES
3015.1 HITS PER LINE
Source Files on master
  • Tree
  • List 15
  • Changed 4
  • Source Changed 0
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line

Recent builds

Builds Branch Commit Type Ran Committer Via Coverage
25913331789 master Fix should allow column list before ENGINE and fix DEPENDS ON multi-table in CREATE MATERIALIZED VIEW (#270) 1. Column list before ENGINE (new): ClickHouse SHOW CREATE TABLE for refreshable materialized views with ENGINE (e.g. Memory) outpu... push 15 May 2026 10:36AM UTC web-flow github
51.66
25711855554 master Allow reserved keywords as bare column names in SELECT list (#269) Extend keyword-as-identifier handling to recognize end-of-statement (EOF or `;`) as a disambiguator in expression position, so projections like `SELECT case`, `SELECT case;`, or `... push 12 May 2026 03:40AM UTC web-flow github
51.62
25662343573 master Fix should allow trailing comma in SELECT list before clause keyword (#268) ClickHouse accepts `SELECT a, FROM t` (e.g. when a column is commented out with `--`). Break the SELECT-item loop after consuming a comma if the next token is a clause-st... push 11 May 2026 09:38AM UTC web-flow github
51.47
25646468838 master Add support of REGEXP as binary operator (#267) push 11 May 2026 02:03AM UTC web-flow github
51.46
24923153228 master fix: ensure projections can have either an order by or a group by (#266) push 25 Apr 2026 05:03AM UTC web-flow github
51.46
24572473754 master Add COMMENT support to CREATE VIEW parser (#265) CREATE VIEW in ClickHouse supports COMMENT between the schema and AS SELECT: CREATE VIEW db.v (columns) COMMENT '{...}' AS SELECT ... The parser previously failed with 'expected EOF or ; but go... push 17 Apr 2026 03:16PM UTC web-flow github
51.45
24495309140 master Add support for CREATE USER VALID UNTIL clause (#264) push 16 Apr 2026 06:19AM UTC web-flow github
51.45
24169250933 master Support COMMENT before AS SELECT in CREATE MATERIALIZED VIEW (#262) ClickHouse 26.2+ changed SHOW CREATE TABLE output to place COMMENT before AS SELECT, while 25.x places it after. The parser only supported COMMENT after AS SELECT, causing parse ... push 09 Apr 2026 02:30AM UTC web-flow github
51.44
23675594783 master fix: Panic on invalid number as query (#260) Co-authored-by: Kemal Hadimli <disq@users.noreply.github.com> push 28 Mar 2026 02:36AM UTC web-flow github
51.43
23238003604 master Add support for window names in WindowExpr (#259) push 18 Mar 2026 09:31AM UTC web-flow github
51.44
See All Builds (468)

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