Skip to content

Conversation

@kyleconroy
Copy link
Collaborator

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

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
@kyleconroy kyleconroy merged commit 34ca664 into main Dec 30, 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