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

Discussion: Support explain(terse) for queries #17218

Open
Tracked by #19361 ...
kwannoel opened this issue Jun 12, 2024 · 1 comment
Open
Tracked by #19361 ...

Discussion: Support explain(terse) for queries #17218

kwannoel opened this issue Jun 12, 2024 · 1 comment
Labels
good first issue Good for newcomers help wanted Issues that need help from contributors type/feature

Comments

@kwannoel
Copy link
Contributor

kwannoel commented Jun 12, 2024

Sometimes we just want to get the structure of the query plan, e.g. just see the plan nodes, to quickly check number of joins, type of joins, type of aggregations.

├─StreamHashAgg
│ └─StreamShare
│   └─StreamExchange
│     └─StreamTableScan

We can support explain(terse) for this purpose.

Not sure if it will cause a lot of burden for our optimizer. If it does, it's not worth it.

To support this is straightforward:

  1. We should reject verbose and terse being set together.
  2. For terse, inside explain, rewrite the XMLNode, we can just keep the Record name. Then for the fields, only keep the following:
Join -> `type`, `predicate`
TableScan -> `table`
Agg -> `aggs`, `group_key`
@kwannoel kwannoel changed the title Investigate: Support explain(terse) for queries Discussion: Support explain(terse) for queries Jun 12, 2024
@github-actions github-actions bot added this to the release-1.10 milestone Jun 12, 2024
@BugenZhao BugenZhao removed this from the release-1.10 milestone Jul 10, 2024
@kwannoel kwannoel closed this as not planned Won't fix, can't repro, duplicate, stale Oct 25, 2024
@kwannoel
Copy link
Contributor Author

kwannoel commented Nov 13, 2024

I think still useful, although it can already be supported via jq + explain (json).

@kwannoel kwannoel reopened this Nov 13, 2024
@kwannoel kwannoel added good first issue Good for newcomers help wanted Issues that need help from contributors and removed needs-discussion labels Nov 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Issues that need help from contributors type/feature
Projects
None yet
Development

No branches or pull requests

2 participants