Add DESCRIBE subquery support for DESCRIBE (SELECT ...) statements#98
Merged
kyleconroy merged 1 commit intomainfrom Dec 30, 2025
Merged
Add DESCRIBE subquery support for DESCRIBE (SELECT ...) statements#98kyleconroy merged 1 commit intomainfrom
kyleconroy merged 1 commit intomainfrom
Conversation
Add support for parsing DESCRIBE queries with subqueries, like `DESCRIBE (SELECT 1, 'Value')`. This required: - Adding TableExpr field to DescribeQuery struct in ast/ast.go - Updating parseDescribe() in parser/parser.go to detect and parse subqueries using the existing parseTableExpression() function - Updating explainDescribeQuery() in internal/explain/statements.go to output the TableExpression properly for subqueries This fixes 84 pending statements across multiple test files, including: - 02378_analyzer_projection_names (major fix) - 00515_shard_desc_table_functions_and_subqueries - 01549_low_cardinality_materialized_view - 01937_nested_chinese - 02096_sql_user_defined_function_alias - 02337_analyzer_columns_basic - 02338_analyzer_constants_basic - 02339_analyzer_matcher_basic - 02340_analyzer_functions - 02342_analyzer_compound_types - 03108_describe_union_all
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add support for parsing DESCRIBE queries with subqueries, like
DESCRIBE (SELECT 1, 'Value'). This required:subqueries using the existing parseTableExpression() function
to output the TableExpression properly for subqueries
This fixes 84 pending statements across multiple test files, including: