Skip to content

Refactor to match ClickHouse EXPLAIN AST json=1 format - #28

Merged
pulpdrew merged 2 commits into
mainfrom
clickhouse-native-ast
Jul 6, 2026
Merged

Refactor to match ClickHouse EXPLAIN AST json=1 format#28
pulpdrew merged 2 commits into
mainfrom
clickhouse-native-ast

Conversation

@pulpdrew

@pulpdrew pulpdrew commented Jul 6, 2026

Copy link
Copy Markdown
Collaborator

Summary

This PR updates the output AST format (and the associated reference files) to match the output from ClickHouse's EXPLAIN AST json=1 AST Serializer, as implemented here.

Reference AST files are now generated using a binary built from the linked branch, using the existing (now modified) npm run generate:expected-outputs -- --ast --regenerate-all-references script.

The AST is a superset of the reference format, with additions now described in the README.

Also closes #25 by adding a locations option to parse.

@pulpdrew pulpdrew changed the title Clickhouse native ast Refactor to match ClickHouse EXPLAIN AST json=1 format Jul 6, 2026

@peter-leonov-ch peter-leonov-ch left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@pulpdrew
pulpdrew merged commit e290068 into main Jul 6, 2026
3 checks passed
@pulpdrew
pulpdrew deleted the clickhouse-native-ast branch July 6, 2026 12:41
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.

Add parse() option to specify whether to include location and parent metadata in the AST

2 participants