Skip to content

Conversation

@kyleconroy
Copy link
Collaborator

This commit adds wrapper types for several AST elements in the EXPLAIN output:

  • Partition: Wraps partition expressions in ALTER commands (ATTACH/DROP/DETACH/REPLACE/FREEZE PARTITION)
  • CheckQuery: New statement type for CHECK TABLE statements
  • Assignment: Wraps column assignments in ALTER UPDATE statements
  • Constraint: Wraps constraint expressions in CREATE TABLE
  • TTLElement: Wraps TTL expressions in CREATE TABLE

Changes:

  • ast/ast.go: Add CheckQuery struct
  • parser/parser.go: Add parseCheck() for CHECK TABLE parsing
  • internal/explain/statements.go: Add wrapper output for Partition, Assignment, Constraint, TTLElement
  • internal/explain/explain.go: Add CheckQuery case in Node dispatch
  • Updated metadata.json files to reflect newly passing explain tests

…aint, TTLElement

This commit adds wrapper types for several AST elements in the EXPLAIN output:

- Partition: Wraps partition expressions in ALTER commands (ATTACH/DROP/DETACH/REPLACE/FREEZE PARTITION)
- CheckQuery: New statement type for CHECK TABLE statements
- Assignment: Wraps column assignments in ALTER UPDATE statements
- Constraint: Wraps constraint expressions in CREATE TABLE
- TTLElement: Wraps TTL expressions in CREATE TABLE

Changes:
- ast/ast.go: Add CheckQuery struct
- parser/parser.go: Add parseCheck() for CHECK TABLE parsing
- internal/explain/statements.go: Add wrapper output for Partition, Assignment, Constraint, TTLElement
- internal/explain/explain.go: Add CheckQuery case in Node dispatch
- Updated metadata.json files to reflect newly passing explain tests
@kyleconroy kyleconroy merged commit cfc44a7 into main Dec 29, 2025
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.

3 participants