@@ -39,39 +39,7 @@ the format from the [configuration value] `datafusion.explain.format`.
3939
4040[ configuration value ] : ../configs.md
4141
42- ### ` indent ` format (default)
43-
44- The ` indent ` format shows both the logical and physical plan, with one line for
45- each operator in the plan. Child plans are indented to show the hierarchy.
46-
47- See [ Reading Explain Plans] ( ../explain-usage.md ) for more information on how to interpret these plans.
48-
49- ``` sql
50- > CREATE TABLE t(x int , b int ) AS VALUES (1 , 2 ), (2 , 3 );
51- 0 row(s) fetched.
52- Elapsed 0 .004 seconds.
53-
54- > EXPLAIN SELECT SUM (x) FROM t GROUP BY b;
55- + -- -------------+-------------------------------------------------------------------------------+
56- | plan_type | plan |
57- + -- -------------+-------------------------------------------------------------------------------+
58- | logical_plan | Projection: sum (t .x ) |
59- | | Aggregate: groupBy= [[t .b ]], aggr= [[sum (CAST(t .x AS Int64))]] |
60- | | TableScan: t projection= [x, b] |
61- | physical_plan | ProjectionExec: expr= [sum (t .x )@1 as sum (t .x )] |
62- | | AggregateExec: mode= FinalPartitioned, gby= [b@0 as b], aggr= [sum (t .x )] |
63- | | CoalesceBatchesExec: target_batch_size= 8192 |
64- | | RepartitionExec: partitioning= Hash([b@0 ], 16 ), input_partitions= 16 |
65- | | RepartitionExec: partitioning= RoundRobinBatch(16 ), input_partitions= 1 |
66- | | AggregateExec: mode= Partial, gby= [b@1 as b], aggr= [sum (t .x )] |
67- | | DataSourceExec: partitions= 1 , partition_sizes= [1 ] |
68- | | |
69- + -- -------------+-------------------------------------------------------------------------------+
70- 2 row(s) fetched.
71- Elapsed 0 .004 seconds.
72- ```
73-
74- ### ` tree ` format
42+ ### ` tree ` format (default)
7543
7644The ` tree ` format is modeled after [ DuckDB plans] and is designed to be easier
7745to see the high level structure of the plan
@@ -138,6 +106,38 @@ to see the high level structure of the plan
138106Elapsed 0 .016 seconds.
139107```
140108
109+ ### ` indent ` format
110+
111+ The ` indent ` format shows both the logical and physical plan, with one line for
112+ each operator in the plan. Child plans are indented to show the hierarchy.
113+
114+ See [ Reading Explain Plans] ( ../explain-usage.md ) for more information on how to interpret these plans.
115+
116+ ``` sql
117+ > CREATE TABLE t(x int , b int ) AS VALUES (1 , 2 ), (2 , 3 );
118+ 0 row(s) fetched.
119+ Elapsed 0 .004 seconds.
120+
121+ > EXPLAIN SELECT SUM (x) FROM t GROUP BY b;
122+ + -- -------------+-------------------------------------------------------------------------------+
123+ | plan_type | plan |
124+ + -- -------------+-------------------------------------------------------------------------------+
125+ | logical_plan | Projection: sum (t .x ) |
126+ | | Aggregate: groupBy= [[t .b ]], aggr= [[sum (CAST(t .x AS Int64))]] |
127+ | | TableScan: t projection= [x, b] |
128+ | physical_plan | ProjectionExec: expr= [sum (t .x )@1 as sum (t .x )] |
129+ | | AggregateExec: mode= FinalPartitioned, gby= [b@0 as b], aggr= [sum (t .x )] |
130+ | | CoalesceBatchesExec: target_batch_size= 8192 |
131+ | | RepartitionExec: partitioning= Hash([b@0 ], 16 ), input_partitions= 16 |
132+ | | RepartitionExec: partitioning= RoundRobinBatch(16 ), input_partitions= 1 |
133+ | | AggregateExec: mode= Partial, gby= [b@1 as b], aggr= [sum (t .x )] |
134+ | | DataSourceExec: partitions= 1 , partition_sizes= [1 ] |
135+ | | |
136+ + -- -------------+-------------------------------------------------------------------------------+
137+ 2 row(s) fetched.
138+ Elapsed 0 .004 seconds.
139+ ```
140+
141141### ` pgjson ` format
142142
143143The ` pgjson ` format is modeled after [ Postgres JSON] format.
0 commit comments