Skip to content

Fix parser tests after ClickHouse 25.8 explain file updates#79

Merged
kyleconroy merged 2 commits intomainfrom
claude/fix-parser-tests-CzJFO
Dec 29, 2025
Merged

Fix parser tests after ClickHouse 25.8 explain file updates#79
kyleconroy merged 2 commits intomainfrom
claude/fix-parser-tests-CzJFO

Conversation

@kyleconroy
Copy link
Copy Markdown
Collaborator

  • Fix WITH clause formatting to distinguish between two CTE syntaxes:

    • WITH name AS (subquery): Output as WithElement (children 1) then Subquery (children 1)
    • WITH (subquery) AS name: Output as Subquery (alias name) (children 1)
  • Set Subquery.Alias for WITH (subquery) AS name syntax in parser
    instead of setting WithElement.Name to correctly distinguish syntaxes

  • Add failing statements to explain_todo in metadata.json files for:

    • Standalone UPDATE queries (new ClickHouse 25.8 feature)
    • WORKLOAD/RESOURCE syntax (not yet supported)
    • PARALLEL WITH syntax (not yet supported)
    • Various other new ClickHouse features

- Fix WITH clause formatting to distinguish between two CTE syntaxes:
  - `WITH name AS (subquery)`: Output as `WithElement (children 1)` then `Subquery (children 1)`
  - `WITH (subquery) AS name`: Output as `Subquery (alias name) (children 1)`

- Set Subquery.Alias for `WITH (subquery) AS name` syntax in parser
  instead of setting WithElement.Name to correctly distinguish syntaxes

- Add failing statements to explain_todo in metadata.json files for:
  - Standalone UPDATE queries (new ClickHouse 25.8 feature)
  - WORKLOAD/RESOURCE syntax (not yet supported)
  - PARALLEL WITH syntax (not yet supported)
  - Various other new ClickHouse features
- Fix CRLF line endings in explain_5.txt for query_cache_ignore_output_settings test
- Add -inf literal parsing difference to explain_todo (parser uses negate(inf) vs literal -inf)
@kyleconroy kyleconroy force-pushed the claude/fix-parser-tests-CzJFO branch from e894c25 to 291db99 Compare December 29, 2025 15:01
@kyleconroy kyleconroy merged commit 16bd8a1 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.

2 participants