Skip to content

[epic] ClickHouse parser gaps from QA sweep #482

@ajitpratap0

Description

@ajitpratap0

Context

Exhaustive QA against the ClickHouse dialect (gosqlx.ParseWithDialect(..., DialectClickHouse)) ran 83 representative real-world queries. 44/83 (53%) pass. This epic tracks the 9 distinct bugs that account for the 39 failures.

QA harness: pkg/sql/parser/clickhouse_qa_test.go (build tag `qa`, excluded from CI). Run with:
```
go test -tags qa -run TestClickHouseQA -v ./pkg/sql/parser/
```

Tracked bugs (sub-issues will be filed against this epic)

  • Nested/parameterised column typesArray(Nullable(T)), Map(K,V), Tuple(...), LowCardinality(String), FixedString(16), CODEC(ZSTD(3), Delta), Distributed('cluster', db, t, key), ReplicatedMergeTree('path','{r}'). Root cause: pkg/sql/parser/ddl_columns.go:77-102 only handles flat type args. 12 failures, biggest single bug.
  • SETTINGS k = v tail clause — unconsumed in SELECT and CREATE TABLE despite keyword being registered.
  • Array literal [1,2,3] — only ARRAY[...] form supported.
  • TTL DDL clause in column and table position.
  • ORDER BY ... WITH FILLWITH after ORDER BY items mis-routed to the WITH-CTE parser.
  • CREATE MATERIALIZED VIEW ... TO/ENGINE variants.
  • ROWS not in non-reserved-id allowlist.
  • Parametric aggregates fn(p)(args) — e.g. quantileTDigest(0.95)(value).
  • INSERT ... FORMAT name tail.

Burndown target

Each PR removes its passing entries from clickhouse_qa_test.go and adds focused regression tests in canonical test files. Target: ≥90% pass rate by end of Wave 4.

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingenhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions