Skip to content

Update explain output for ClickHouse 26.8 (batch 7: SYSTEM, construction settings, SOME/ALL) - #134

Merged
kyleconroy merged 4 commits into
claude/project-thread-8e2oya-syntax-6from
claude/project-thread-8e2oya-syntax-7
Dec 1, 2026
Merged

kyleconroy merged 4 commits into
claude/project-thread-8e2oya-syntax-6from
claude/project-thread-8e2oya-syntax-7

Conversation

@kyleconroy

Copy link
Copy Markdown
Collaborator

Requested by Kyle · project thread

Summary

Batch 7 of the ClickHouse 26.8 explain work. Pending explain_todo statements: 1,200 → 958.

  • SYSTEM commands: REFRESH/STOP/START/PAUSE/CANCEL/WAIT/TEST VIEW, START/STOP REPLICATED VIEW, ... ALL BACKGROUND, SCHEDULE MERGE t PARTS ... (prints the parts list), DROP [DATABASE] REPLICA ... FROM SHARD/TABLE/DATABASE/ZKPATH, SYNC [DATABASE] REPLICA ... IF EXISTS/STRICT/LIGHTWEIGHT FROM/PULL, SYNC TRANSACTION LOG, UNFREEZE WITH NAME, DROP POINT IN POLYGON CACHE, CLEAR FORMAT SCHEMA CACHE, INSTRUMENT ADD/REMOVE.
  • Query-construction settings: ClickHouse 26.x materializes SETTINGS limit/offset/page/select/filter/order/sort into the AST by wrapping the (sub)query as a derived table (executeQuery.cpp: wrapAsConstructedSelect and friends). The explain printer now does the same. It covers the top-level, nested, per-UNION-arm and INSERT ... SELECT scopes, and leaves view definitions and MODIFY QUERY untouched.
  • SOME/ALL on arrays: x = SOME(arr) becomes has, x <> ALL(arr) becomes NOT has, and other operators (including LIKE/ILIKE/REGEXP/IS [NOT] DISTINCT FROM) become arrayExists/arrayAll lambdas, with ClickHouse's _a/_aN variable naming.
  • Smaller fixes:
    • NATURAL [LEFT|FULL|...] JOIN.
    • * LIKE 'p' and t.* ILIKE 'p' now become column matchers.
    • NOT ILIKE now prints as notILike.
    • = ANY(x) keeps the source case of the function name.

Test Plan

  • go test ./parser/... -timeout 30s passes.
  • go test ./parser/... -check-explain was run, and the updated metadata.json files are included.
  • New syntax was spot-checked against a local ClickHouse 26.8.51.4 server with EXPLAIN AST.

Generated by Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LuRZ4KB7DMX365Nmn5ksnY
…rder/sort/page) like ClickHouse 26.x

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LuRZ4KB7DMX365Nmn5ksnY
…n matchers

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LuRZ4KB7DMX365Nmn5ksnY
@kyleconroy kyleconroy self-assigned this Dec 1, 2026
@kyleconroy
kyleconroy added this pull request to stack #128 December 1, 2026 06:27
@kyleconroy
kyleconroy merged commit f1d97c4 into main Dec 1, 2026
1 check 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