+---------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| plan_type     | plan                                                                                                                                                                  |
+---------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| logical_plan  | Sort: custdist DESC NULLS FIRST, c_count DESC NULLS FIRST                                                                                                             |
|               |   Projection: c_count, COUNT(UInt8(1)) AS custdist                                                                                                                    |
|               |     Aggregate: groupBy=[[c_count]], aggr=[[COUNT(UInt8(1))]]                                                                                                          |
|               |       Projection: c_orders.COUNT(orders.o_orderkey) AS c_count                                                                                                        |
|               |         SubqueryAlias: c_orders                                                                                                                                       |
|               |           Projection: COUNT(orders.o_orderkey)                                                                                                                        |
|               |             Aggregate: groupBy=[[customer.c_custkey]], aggr=[[COUNT(orders.o_orderkey)]]                                                                              |
|               |               Projection: customer.c_custkey, orders.o_orderkey                                                                                                       |
|               |                 Left Join: customer.c_custkey = orders.o_custkey                                                                                                      |
|               |                   TableScan: customer projection=[c_custkey]                                                                                                          |
|               |                   Projection: orders.o_orderkey, orders.o_custkey                                                                                                     |
|               |                     Filter: orders.o_comment NOT LIKE Utf8("%special%requests%")                                                                                      |
|               |                       TableScan: orders projection=[o_orderkey, o_custkey, o_comment]                                                                                 |
| physical_plan | SortPreservingMergeExec: [custdist@1 DESC,c_count@0 DESC]                                                                                                             |
|               |   SortExec: expr=[custdist@1 DESC,c_count@0 DESC]                                                                                                                     |
|               |     ProjectionExec: expr=[c_count@0 as c_count, COUNT(UInt8(1))@1 as custdist]                                                                                        |
|               |       AggregateExec: mode=FinalPartitioned, gby=[c_count@0 as c_count], aggr=[COUNT(UInt8(1))]                                                                        |
|               |         CoalesceBatchesExec: target_batch_size=8192                                                                                                                   |
|               |           RepartitionExec: partitioning=Hash([Column { name: "c_count", index: 0 }], 2), input_partitions=2                                                           |
|               |             AggregateExec: mode=Partial, gby=[c_count@0 as c_count], aggr=[COUNT(UInt8(1))]                                                                           |
|               |               ProjectionExec: expr=[COUNT(orders.o_orderkey)@0 as c_count]                                                                                            |
|               |                 ProjectionExec: expr=[COUNT(orders.o_orderkey)@1 as COUNT(orders.o_orderkey)]                                                                         |
|               |                   AggregateExec: mode=FinalPartitioned, gby=[c_custkey@0 as c_custkey], aggr=[COUNT(orders.o_orderkey)]                                               |
|               |                     CoalesceBatchesExec: target_batch_size=8192                                                                                                       |
|               |                       RepartitionExec: partitioning=Hash([Column { name: "c_custkey", index: 0 }], 2), input_partitions=2                                             |
|               |                         AggregateExec: mode=Partial, gby=[c_custkey@0 as c_custkey], aggr=[COUNT(orders.o_orderkey)]                                                  |
|               |                           RepartitionExec: partitioning=RoundRobinBatch(2), input_partitions=2                                                                        |
|               |                             ProjectionExec: expr=[c_custkey@0 as c_custkey, o_orderkey@1 as o_orderkey]                                                               |
|               |                               CoalesceBatchesExec: target_batch_size=8192                                                                                             |
|               |                                 HashJoinExec: mode=Partitioned, join_type=Left, on=[(Column { name: "c_custkey", index: 0 }, Column { name: "o_custkey", index: 1 })] |
|               |                                   CoalesceBatchesExec: target_batch_size=8192                                                                                         |
|               |                                     RepartitionExec: partitioning=Hash([Column { name: "c_custkey", index: 0 }], 2), input_partitions=0                               |
|               |                                       MemoryExec: partitions=0, partition_sizes=[]                                                                                    |
|               |                                   CoalesceBatchesExec: target_batch_size=8192                                                                                         |
|               |                                     RepartitionExec: partitioning=Hash([Column { name: "o_custkey", index: 1 }], 2), input_partitions=2                               |
|               |                                       RepartitionExec: partitioning=RoundRobinBatch(2), input_partitions=0                                                            |
|               |                                         ProjectionExec: expr=[o_orderkey@0 as o_orderkey, o_custkey@1 as o_custkey]                                                   |
|               |                                           CoalesceBatchesExec: target_batch_size=8192                                                                                 |
|               |                                             FilterExec: o_comment@2 NOT LIKE %special%requests%                                                                       |
|               |                                               MemoryExec: partitions=0, partition_sizes=[]                                                                            |
|               |                                                                                                                                                                       |
+---------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+