+---------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| plan_type     | plan                                                                                                                                                                                                                                                                                            |
+---------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| logical_plan  | Sort: numwait DESC NULLS FIRST, supplier.s_name ASC NULLS LAST                                                                                                                                                                                                                                  |
|               |   Projection: supplier.s_name, COUNT(UInt8(1)) AS numwait                                                                                                                                                                                                                                       |
|               |     Aggregate: groupBy=[[supplier.s_name]], aggr=[[COUNT(UInt8(1))]]                                                                                                                                                                                                                            |
|               |       Projection: supplier.s_name                                                                                                                                                                                                                                                               |
|               |         LeftAnti Join: l1.l_orderkey = l3.l_orderkey Filter: l3.l_suppkey != l1.l_suppkey                                                                                                                                                                                                       |
|               |           LeftSemi Join: l1.l_orderkey = l2.l_orderkey Filter: l2.l_suppkey != l1.l_suppkey                                                                                                                                                                                                     |
|               |             Projection: supplier.s_name, l1.l_orderkey, l1.l_suppkey                                                                                                                                                                                                                            |
|               |               Inner Join: supplier.s_nationkey = nation.n_nationkey                                                                                                                                                                                                                             |
|               |                 Projection: supplier.s_name, supplier.s_nationkey, l1.l_orderkey, l1.l_suppkey                                                                                                                                                                                                  |
|               |                   Inner Join: l1.l_orderkey = orders.o_orderkey                                                                                                                                                                                                                                 |
|               |                     Projection: supplier.s_name, supplier.s_nationkey, l1.l_orderkey, l1.l_suppkey                                                                                                                                                                                              |
|               |                       Inner Join: supplier.s_suppkey = l1.l_suppkey                                                                                                                                                                                                                             |
|               |                         TableScan: supplier projection=[s_suppkey, s_name, s_nationkey]                                                                                                                                                                                                         |
|               |                         SubqueryAlias: l1                                                                                                                                                                                                                                                       |
|               |                           Projection: lineitem.l_orderkey, lineitem.l_suppkey                                                                                                                                                                                                                   |
|               |                             Filter: lineitem.l_receiptdate > lineitem.l_commitdate                                                                                                                                                                                                              |
|               |                               TableScan: lineitem projection=[l_orderkey, l_suppkey, l_commitdate, l_receiptdate]                                                                                                                                                                               |
|               |                     Projection: orders.o_orderkey                                                                                                                                                                                                                                               |
|               |                       Filter: orders.o_orderstatus = Utf8("F")                                                                                                                                                                                                                                  |
|               |                         TableScan: orders projection=[o_orderkey, o_orderstatus]                                                                                                                                                                                                                |
|               |                 Projection: nation.n_nationkey                                                                                                                                                                                                                                                  |
|               |                   Filter: nation.n_name = Utf8("SAUDI ARABIA")                                                                                                                                                                                                                                  |
|               |                     TableScan: nation projection=[n_nationkey, n_name]                                                                                                                                                                                                                          |
|               |             SubqueryAlias: l2                                                                                                                                                                                                                                                                   |
|               |               TableScan: lineitem projection=[l_orderkey, l_suppkey]                                                                                                                                                                                                                            |
|               |           SubqueryAlias: l3                                                                                                                                                                                                                                                                     |
|               |             Projection: lineitem.l_orderkey, lineitem.l_suppkey                                                                                                                                                                                                                                 |
|               |               Filter: lineitem.l_receiptdate > lineitem.l_commitdate                                                                                                                                                                                                                            |
|               |                 TableScan: lineitem projection=[l_orderkey, l_suppkey, l_commitdate, l_receiptdate]                                                                                                                                                                                             |
| physical_plan | SortPreservingMergeExec: [numwait@1 DESC,s_name@0 ASC NULLS LAST]                                                                                                                                                                                                                               |
|               |   SortExec: expr=[numwait@1 DESC,s_name@0 ASC NULLS LAST]                                                                                                                                                                                                                                       |
|               |     ProjectionExec: expr=[s_name@0 as s_name, COUNT(UInt8(1))@1 as numwait]                                                                                                                                                                                                                     |
|               |       AggregateExec: mode=FinalPartitioned, gby=[s_name@0 as s_name], aggr=[COUNT(UInt8(1))]                                                                                                                                                                                                    |
|               |         CoalesceBatchesExec: target_batch_size=8192                                                                                                                                                                                                                                             |
|               |           RepartitionExec: partitioning=Hash([Column { name: "s_name", index: 0 }], 2), input_partitions=2                                                                                                                                                                                      |
|               |             AggregateExec: mode=Partial, gby=[s_name@0 as s_name], aggr=[COUNT(UInt8(1))]                                                                                                                                                                                                       |
|               |               ProjectionExec: expr=[s_name@0 as s_name]                                                                                                                                                                                                                                         |
|               |                 CoalesceBatchesExec: target_batch_size=8192                                                                                                                                                                                                                                     |
|               |                   HashJoinExec: mode=Partitioned, join_type=LeftAnti, on=[(Column { name: "l_orderkey", index: 1 }, Column { name: "l_orderkey", index: 0 })], filter=BinaryExpr { left: Column { name: "l_suppkey", index: 1 }, op: NotEq, right: Column { name: "l_suppkey", index: 0 } }     |
|               |                     CoalesceBatchesExec: target_batch_size=8192                                                                                                                                                                                                                                 |
|               |                       HashJoinExec: mode=Partitioned, join_type=LeftSemi, on=[(Column { name: "l_orderkey", index: 1 }, Column { name: "l_orderkey", index: 0 })], filter=BinaryExpr { left: Column { name: "l_suppkey", index: 1 }, op: NotEq, right: Column { name: "l_suppkey", index: 0 } } |
|               |                         CoalesceBatchesExec: target_batch_size=8192                                                                                                                                                                                                                             |
|               |                           RepartitionExec: partitioning=Hash([Column { name: "l_orderkey", index: 1 }], 2), input_partitions=2                                                                                                                                                                  |
|               |                             ProjectionExec: expr=[s_name@0 as s_name, l_orderkey@2 as l_orderkey, l_suppkey@3 as l_suppkey]                                                                                                                                                                     |
|               |                               CoalesceBatchesExec: target_batch_size=8192                                                                                                                                                                                                                       |
|               |                                 HashJoinExec: mode=Partitioned, join_type=Inner, on=[(Column { name: "s_nationkey", index: 1 }, Column { name: "n_nationkey", index: 0 })]                                                                                                                      |
|               |                                   CoalesceBatchesExec: target_batch_size=8192                                                                                                                                                                                                                   |
|               |                                     RepartitionExec: partitioning=Hash([Column { name: "s_nationkey", index: 1 }], 2), input_partitions=2                                                                                                                                                       |
|               |                                       ProjectionExec: expr=[s_name@0 as s_name, s_nationkey@1 as s_nationkey, l_orderkey@2 as l_orderkey, l_suppkey@3 as l_suppkey]                                                                                                                             |
|               |                                         CoalesceBatchesExec: target_batch_size=8192                                                                                                                                                                                                             |
|               |                                           HashJoinExec: mode=Partitioned, join_type=Inner, on=[(Column { name: "l_orderkey", index: 2 }, Column { name: "o_orderkey", index: 0 })]                                                                                                              |
|               |                                             CoalesceBatchesExec: target_batch_size=8192                                                                                                                                                                                                         |
|               |                                               RepartitionExec: partitioning=Hash([Column { name: "l_orderkey", index: 2 }], 2), input_partitions=2                                                                                                                                              |
|               |                                                 RepartitionExec: partitioning=RoundRobinBatch(2), input_partitions=2                                                                                                                                                                            |
|               |                                                   ProjectionExec: expr=[s_name@1 as s_name, s_nationkey@2 as s_nationkey, l_orderkey@3 as l_orderkey, l_suppkey@4 as l_suppkey]                                                                                                                 |
|               |                                                     CoalesceBatchesExec: target_batch_size=8192                                                                                                                                                                                                 |
|               |                                                       HashJoinExec: mode=Partitioned, join_type=Inner, on=[(Column { name: "s_suppkey", index: 0 }, Column { name: "l_suppkey", index: 1 })]                                                                                                    |
|               |                                                         CoalesceBatchesExec: target_batch_size=8192                                                                                                                                                                                             |
|               |                                                           RepartitionExec: partitioning=Hash([Column { name: "s_suppkey", index: 0 }], 2), input_partitions=0                                                                                                                                   |
|               |                                                             MemoryExec: partitions=0, partition_sizes=[]                                                                                                                                                                                        |
|               |                                                         CoalesceBatchesExec: target_batch_size=8192                                                                                                                                                                                             |
|               |                                                           RepartitionExec: partitioning=Hash([Column { name: "l_suppkey", index: 1 }], 2), input_partitions=2                                                                                                                                   |
|               |                                                             RepartitionExec: partitioning=RoundRobinBatch(2), input_partitions=0                                                                                                                                                                |
|               |                                                               ProjectionExec: expr=[l_orderkey@0 as l_orderkey, l_suppkey@1 as l_suppkey]                                                                                                                                                       |
|               |                                                                 CoalesceBatchesExec: target_batch_size=8192                                                                                                                                                                                     |
|               |                                                                   FilterExec: l_receiptdate@3 > l_commitdate@2                                                                                                                                                                                  |
|               |                                                                     MemoryExec: partitions=0, partition_sizes=[]                                                                                                                                                                                |
|               |                                             CoalesceBatchesExec: target_batch_size=8192                                                                                                                                                                                                         |
|               |                                               RepartitionExec: partitioning=Hash([Column { name: "o_orderkey", index: 0 }], 2), input_partitions=2                                                                                                                                              |
|               |                                                 RepartitionExec: partitioning=RoundRobinBatch(2), input_partitions=0                                                                                                                                                                            |
|               |                                                   ProjectionExec: expr=[o_orderkey@0 as o_orderkey]                                                                                                                                                                                             |
|               |                                                     CoalesceBatchesExec: target_batch_size=8192                                                                                                                                                                                                 |
|               |                                                       FilterExec: o_orderstatus@1 = F                                                                                                                                                                                                           |
|               |                                                         MemoryExec: partitions=0, partition_sizes=[]                                                                                                                                                                                            |
|               |                                   CoalesceBatchesExec: target_batch_size=8192                                                                                                                                                                                                                   |
|               |                                     RepartitionExec: partitioning=Hash([Column { name: "n_nationkey", index: 0 }], 2), input_partitions=2                                                                                                                                                       |
|               |                                       RepartitionExec: partitioning=RoundRobinBatch(2), input_partitions=0                                                                                                                                                                                      |
|               |                                         ProjectionExec: expr=[n_nationkey@0 as n_nationkey]                                                                                                                                                                                                     |
|               |                                           CoalesceBatchesExec: target_batch_size=8192                                                                                                                                                                                                           |
|               |                                             FilterExec: n_name@1 = SAUDI ARABIA                                                                                                                                                                                                                 |
|               |                                               MemoryExec: partitions=0, partition_sizes=[]                                                                                                                                                                                                      |
|               |                         CoalesceBatchesExec: target_batch_size=8192                                                                                                                                                                                                                             |
|               |                           RepartitionExec: partitioning=Hash([Column { name: "l_orderkey", index: 0 }], 2), input_partitions=0                                                                                                                                                                  |
|               |                             MemoryExec: partitions=0, partition_sizes=[]                                                                                                                                                                                                                        |
|               |                     CoalesceBatchesExec: target_batch_size=8192                                                                                                                                                                                                                                 |
|               |                       RepartitionExec: partitioning=Hash([Column { name: "l_orderkey", index: 0 }], 2), input_partitions=2                                                                                                                                                                      |
|               |                         RepartitionExec: partitioning=RoundRobinBatch(2), input_partitions=0                                                                                                                                                                                                    |
|               |                           ProjectionExec: expr=[l_orderkey@0 as l_orderkey, l_suppkey@1 as l_suppkey]                                                                                                                                                                                           |
|               |                             CoalesceBatchesExec: target_batch_size=8192                                                                                                                                                                                                                         |
|               |                               FilterExec: l_receiptdate@3 > l_commitdate@2                                                                                                                                                                                                                      |
|               |                                 MemoryExec: partitions=0, partition_sizes=[]                                                                                                                                                                                                                    |
|               |                                                                                                                                                                                                                                                                                                 |
+---------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+