Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: explain AST/syntax statement #7063

Closed
sundy-li opened this issue Aug 10, 2022 · 0 comments · Fixed by #7215
Closed

Feature: explain AST/syntax statement #7063

sundy-li opened this issue Aug 10, 2022 · 0 comments · Fixed by #7215
Assignees
Labels
C-feature Category: feature

Comments

@sundy-li
Copy link
Member

Summary

Description for this feature.

  • explain syntax: output the formatted SQL .

Example:

EXPLAIN SYNTAX
SELECT number
FROM numbers(10)

┌─explain──────────┐
│ SELECT number    │
│ FROM numbers(10) │
└──────────────────┘
  • explain ast: output the AST struct.

Example:

explain ast select number from numbers(10);


┌─explain─────────────────────────────────────┐
│ SelectWithUnionQuery (children 1)           │
│  ExpressionList (children 1)                │
│   SelectQuery (children 2)                  │
│    ExpressionList (children 1)              │
│     Identifier number                       │
│    TablesInSelectQuery (children 1)         │
│     TablesInSelectQueryElement (children 1) │
│      TableExpression (children 1)           │
│       Function numbers (children 1)         │
│        ExpressionList (children 1)          │
│         Literal UInt64_10                   │
└─────────────────────────────────────────────┘
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-feature Category: feature
Projects
Status: 📋 Backlog
Development

Successfully merging a pull request may close this issue.

3 participants