@@ -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,40 @@ to see the high level structure of the plan
138106Elapsed 0 .016 seconds.
139107```
140108
109+
110+ ### ` indent ` format
111+
112+ The ` indent ` format shows both the logical and physical plan, with one line for
113+ each operator in the plan. Child plans are indented to show the hierarchy.
114+
115+ See [ Reading Explain Plans] ( ../explain-usage.md ) for more information on how to interpret these plans.
116+
117+ ``` sql
118+ > CREATE TABLE t(x int , b int ) AS VALUES (1 , 2 ), (2 , 3 );
119+ 0 row(s) fetched.
120+ Elapsed 0 .004 seconds.
121+
122+ > EXPLAIN SELECT SUM (x) FROM t GROUP BY b;
123+ + -- -------------+-------------------------------------------------------------------------------+
124+ | plan_type | plan |
125+ + -- -------------+-------------------------------------------------------------------------------+
126+ | logical_plan | Projection: sum (t .x ) |
127+ | | Aggregate: groupBy= [[t .b ]], aggr= [[sum (CAST(t .x AS Int64))]] |
128+ | | TableScan: t projection= [x, b] |
129+ | physical_plan | ProjectionExec: expr= [sum (t .x )@1 as sum (t .x )] |
130+ | | AggregateExec: mode= FinalPartitioned, gby= [b@0 as b], aggr= [sum (t .x )] |
131+ | | CoalesceBatchesExec: target_batch_size= 8192 |
132+ | | RepartitionExec: partitioning= Hash([b@0 ], 16 ), input_partitions= 16 |
133+ | | RepartitionExec: partitioning= RoundRobinBatch(16 ), input_partitions= 1 |
134+ | | AggregateExec: mode= Partial, gby= [b@1 as b], aggr= [sum (t .x )] |
135+ | | DataSourceExec: partitions= 1 , partition_sizes= [1 ] |
136+ | | |
137+ + -- -------------+-------------------------------------------------------------------------------+
138+ 2 row(s) fetched.
139+ Elapsed 0 .004 seconds.
140+ ```
141+
142+
141143### ` pgjson ` format
142144
143145The ` pgjson ` format is modeled after [ Postgres JSON] format.
0 commit comments