- 
                Notifications
    You must be signed in to change notification settings 
- Fork 1.7k
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
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:
- Add the relevant code to the operator
- Add / update explain_tree.slt test to show the new code in action
You can run the tests like
cargo test --test sqllogictests -- explain_treeYou can update the test like this:
cargo test --test sqllogictests -- explain_tree --completeDescribe alternatives you've considered
Here is an example PR: TODO
Additional context
No response
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request