Skip to content

Batch 10 of 26.8 syntax: backup/database secret masking, IN/NOT/WITH INSERT output, VALID FOR - #137

Merged
kyleconroy merged 14 commits into
claude/project-thread-8e2oya-syntax-9from
claude/project-thread-8e2oya-syntax-10
Dec 1, 2026
Merged

kyleconroy merged 14 commits into
claude/project-thread-8e2oya-syntax-9from
claude/project-thread-8e2oya-syntax-10

Conversation

@kyleconroy

Copy link
Copy Markdown
Collaborator

Requested by Kyle · project thread

Summary

Tenth batch of ClickHouse 26.8 fixes, stacked on #136. explain_todo goes from 409 to 94 pending statements.

  • Secret masking: ports findBackupNameSecretArguments, findDatabaseEngineSecretArguments (including the Backup engine's nested S3 locator reconstruction) and findBigQuerySecretArguments into internal/explain/secrets_backup.go. IN lists inside encrypt/HMAC spans are hidden, and arrays of expressions no longer count as literals.
  • 26.8 output changes:
    • x IN ((a, b)) prints the tuple directly.
    • Parenthesized literals fold into tuple and array literals.
    • NOT (x) binds like NOT x.
    • WITH ... INSERT puts the WITH clause first in each SELECT.
    • KILL ... TEST no longer shows in the node ID.
    • Unset Nullable query parameters become _CAST(NULL, T).
    • {x:Identifier} prints as an Identifier.
  • New syntax:
    • STREAM clauses and LOCAL joins
    • VALID FOR intervals
    • negative tuple indexes (t.-1)
    • INSERT INTO t (cols) (SELECT ...)
    • view column name lists
    • SHOW CREATE USERS/ROLES/QUOTAS/PROFILES/POLICIES
    • INTO OUTFILE, FORMAT and SETTINGS on SHOW access entities
    • column COLLATE (a Collation child)
    • RESTORE ... AS
    • UPDATE ... SETTINGS
    • OPTIMIZE FORMAT/SETTINGS in either order
  • Other fixes:
    • nan/inf operands of ::
    • -nan literals
    • string and CAST parameters in AggregateFunction types
    • dictionary layout array literals
    • union grouping with a rightmost DISTINCT

Test Plan

  • go test ./parser/... -timeout 60s passes.
  • go test ./parser/... -check-explain was run after each change, and the metadata updates are committed.
  • Each fix was compared against a local ClickHouse 26.8 server's EXPLAIN AST output.

Generated by Claude Code

claude added 14 commits December 1, 2026 07:06
Adds FROM t STREAM [BOUNDED] [UNORDERED] [CURSOR {...}] [WATERMARK ...]
printed as ASTStreamSettings, LOCAL [kind] JOIN, CTE bodies that start
with a parenthesized union, and regroups unions the way ClickHouse's
NormalizeSelectWithUnionQueryVisitor does (the rightmost DISTINCT
absorbs everything to its left).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LuRZ4KB7DMX365Nmn5ksnY
Port findBackupNameSecretArguments, findDatabaseEngineSecretArguments
(including the Backup engine's nested locator reconstruction) and
findBigQuerySecretArguments from FunctionSecretArgumentsFinder.cpp.

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

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

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

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

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 07:33
@kyleconroy
kyleconroy merged commit 51138f0 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