Skip to content

Clear the remaining explain_todo statements from the enabled tests - #141

Merged
kyleconroy merged 1 commit into
claude/project-thread-wk8rxb-quotafrom
claude/project-thread-wk8rxb-todo
Dec 1, 2026
Merged

kyleconroy merged 1 commit into
claude/project-thread-wk8rxb-quotafrom
claude/project-thread-wk8rxb-todo

Conversation

@kyleconroy

Copy link
Copy Markdown
Collaborator

Requested by Kyle · project thread

Summary

Stacked on #140. This fixes the other 20 explain_todo statements from the tests enabled in #139, so explain_todo is empty again.

  • SHOW TABLES IN db is accepted (same as FROM).
  • COLUMN can be an implicit alias (select nonexistent column).
  • Double-quoted identifiers use the same escape rules as backquoted ones, so unknown escapes like \u keep their backslash. Identifier and column names are printed with ClickHouse's writeEscapedString escaping (\\, \', \t, \b, ...).
  • The DISTINCT group of a mixed union flattens nested unions, as NormalizeSelectWithUnionQueryMatcher::getSelectsFromUnionListNode does.
  • (EXPLAIN CURRENT TRANSACTION) as a subquery prints viewExplain with two arguments. TRANSACTION was being read as an alias.
  • A query parameter in WITH (with {p:UInt8} as p) keeps its alias.
  • INTERVAL CASE ... END MINUTE parses as an interval.
  • WITH elements that ClickHouse clones into later SELECTs of a union print TableJoin before TableExpression, matching ASTTablesInSelectQueryElement::clone.

go test ./... passes. -check-explain leaves no pending statements.


Generated by Claude Code

- SHOW TABLES accepts IN as well as FROM.
- COLUMN can be an implicit alias (select x column).
- Double-quoted identifiers use the same escape rules as backquoted ones,
  so unknown escapes keep their backslash; identifier and column names
  are escaped like ClickHouse's writeEscapedString when printed.
- The DISTINCT group of a mixed union flattens nested unions, matching
  NormalizeSelectWithUnionQueryMatcher.
- EXPLAIN CURRENT TRANSACTION works as a subquery (viewExplain with two
  arguments).
- A query parameter in WITH keeps its alias.
- INTERVAL CASE ... END <unit> parses as an interval.
- WITH elements cloned into later SELECTs of a union print TableJoin
  before TableExpression, as ASTTablesInSelectQueryElement::clone does.

explain_todo is empty again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LuRZ4GWXBrmUXAf6RUPFSs
@kyleconroy kyleconroy self-assigned this Dec 1, 2026
@kyleconroy
kyleconroy added this pull request to stack #142 December 1, 2026 13:10
@kyleconroy
kyleconroy merged commit 14c9c78 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