Skip to content

Commit 19f9353

Browse files
committed
Add Explain function for AST to EXPLAIN AST output
Add a new Explain function that takes an ast.Statement and returns a string in the same format as ClickHouse's EXPLAIN AST output. The implementation handles: - SELECT queries with all clauses (FROM, WHERE, GROUP BY, HAVING, ORDER BY, LIMIT, OFFSET) - Expressions (literals, identifiers, functions, binary/unary operations) - Table expressions (table identifiers, subqueries, table functions) - JOINs and ARRAY JOINs - Window functions with OVER clauses - CASE/WHEN expressions - IN/BETWEEN/LIKE expressions - Lambda expressions Also adds tests that verify the output matches the explain.txt files in the parser/testdata directory.
1 parent 898e780 commit 19f9353

File tree

2 files changed

+941
-0
lines changed

2 files changed

+941
-0
lines changed

0 commit comments

Comments
 (0)