Skip to content

Sync test queries with ClickHouse 26.8 LTS - #126

Merged
kyleconroy merged 3 commits into
claude/project-thread-8e2oya-bump-26.8from
claude/project-thread-8e2oya-sync-tests
Dec 1, 2026
Merged

kyleconroy merged 3 commits into
claude/project-thread-8e2oya-bump-26.8from
claude/project-thread-8e2oya-sync-tests

Conversation

@kyleconroy

Copy link
Copy Markdown
Collaborator

Requested by Kyle · project thread

Stacked on the 26.8 bump PR. Its base will move to main as the stack merges.

Summary

Syncs parser/testdata with the stateless SQL tests of ClickHouse v26.8.51.4-lts:

  • 4,034 new tests, mostly 04xxx/05xxx, which cover syntax added since 25.8.
  • 1,428 updated tests whose query.sql changed upstream. Their old explain files and explain_todo entries are dropped and regenerated.
  • 85 tests that no longer exist upstream are left as they are.

Adds cmd/sync-tests so the next release is one command: go run ./cmd/sync-tests -src <ClickHouse>/tests/queries/0_stateless, then regenerate and -mark-todo.

The test harness now turns an explainer panic into a failure of that statement, or an explain_todo entry with -mark-todo, instead of aborting the whole run.

About 97% of the new tests' statements already match. 3,649 statements across the suite are in explain_todo; about 1,100 are parse errors from new syntax. Examples: EMPTY AS SELECT, SOME (subquery), JSON .@path, APPLY PATCHES, EXECUTE AS, CREATE MASKING POLICY, pipe operators |>, UNIQUE KEY, compound interval literals, and table column alias lists. Follow-up PRs work through them.

Heads-up: this roughly doubles the number of fixture files, from about 127k to 233k. The packed repo stays at about 20 MB.

Test Plan

  • go run ./cmd/sync-tests, go run ./cmd/regenerate-explain, then go test ./parser/... -mark-todo.
  • go test ./... passes.

Generated by Claude Code

@kyleconroy kyleconroy self-assigned this Dec 1, 2026
cmd/sync-tests copies ClickHouse's stateless SQL tests into
parser/testdata, so the fixtures can be refreshed for each release.
The test harness now turns a panic into a failure of that statement
(or an explain_todo entry with -mark-todo) instead of aborting the run.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LuRZ4KB7DMX365Nmn5ksnY
Import the stateless SQL tests from ClickHouse v26.8.51.4-lts with
cmd/sync-tests: 4,034 new tests and 1,428 tests whose queries changed
upstream. Explain files were generated with cmd/regenerate-explain and
statements that don't pass yet are marked explain_todo.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LuRZ4KB7DMX365Nmn5ksnY
@kyleconroy
kyleconroy force-pushed the claude/project-thread-8e2oya-sync-tests branch from 325b992 to 9c89118 Compare December 1, 2026 04:55
@kyleconroy
kyleconroy added this pull request to stack #128 December 1, 2026 05:09
@kyleconroy
kyleconroy merged commit e1a9ed0 into main Dec 1, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants