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

Implement tree explain for FilterExec #15000

Open
Tracked by #14914
alamb opened this issue Mar 4, 2025 · 0 comments · May be fixed by #15001
Open
Tracked by #14914

Implement tree explain for FilterExec #15000

alamb opened this issue Mar 4, 2025 · 0 comments · May be fixed by #15001
Assignees
Labels
enhancement New feature or request

Comments

@alamb
Copy link
Contributor

alamb commented Mar 4, 2025

Is your feature request related to a problem or challenge?

@irenjj added a new tree explain mode in #14677. Now we need to add support for different types of operators.

set datafusion.explain.format = 'tree';
create table foo(x int, y int) as values (1,2), (3,4);
explain select * from foo where x = 4;
+---------------+------------------------------------+
| plan_type     | plan                               |
+---------------+------------------------------------+
| logical_plan  | Filter: foo.x = Int32(4)           |
|               |   TableScan: foo projection=[x, y] |
| physical_plan | ┌───────────────────────────┐      |
|               | │    CoalesceBatchesExec    │      |
|               | └─────────────┬─────────────┘      |
|               | ┌─────────────┴─────────────┐      |
|               | │         FilterExec        │      |
|               | └─────────────┬─────────────┘      |
|               | ┌─────────────┴─────────────┐      |
|               | │       DataSourceExec      │      |
|               | │    --------------------   │      |
|               | │    partition_sizes: [1]   │      |
|               | │       partitions: 1       │      |
|               | └───────────────────────────┘      |
|               |                                    |
+---------------+------------------------------------+

Describe the solution you'd like

Add tree format to the named ExecutionPlan

Roughly speaking the process goes like:

  1. Add the relevant code to the operator
  2. Add / update explain_tree.slt test to show the new code in action

You can run the tests like

cargo test --test sqllogictests -- explain_tree

You can update the test like this:

cargo test --test sqllogictests -- explain_tree --complete

Describe alternatives you've considered

Here is an example PR: TODO

Additional context

No response

@alamb alamb added the enhancement New feature or request label Mar 4, 2025
@alamb alamb self-assigned this Mar 4, 2025
@alamb alamb linked a pull request Mar 4, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant