+---------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| plan_type     | plan                                                                                                                                                                                                                                                                                                                                    |
+---------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| logical_plan  | Sort: revenue DESC NULLS FIRST, orders.o_orderdate ASC NULLS LAST                                                                                                                                                                                                                                                                       |
|               |   Projection: lineitem.l_orderkey, SUM(lineitem.l_extendedprice * Int64(1) - lineitem.l_discount) AS revenue, orders.o_orderdate, orders.o_shippriority                                                                                                                                                                                 |
|               |     Aggregate: groupBy=[[lineitem.l_orderkey, orders.o_orderdate, orders.o_shippriority]], aggr=[[SUM(CAST(lineitem.l_extendedprice AS Decimal128(38, 4)) * CAST(Decimal128(Some(100),23,2) - CAST(lineitem.l_discount AS Decimal128(23, 2)) AS Decimal128(38, 4))) AS SUM(lineitem.l_extendedprice * Int64(1) - lineitem.l_discount)]] |
|               |       Projection: orders.o_orderdate, orders.o_shippriority, lineitem.l_orderkey, lineitem.l_extendedprice, lineitem.l_discount                                                                                                                                                                                                         |
|               |         Inner Join: orders.o_orderkey = lineitem.l_orderkey                                                                                                                                                                                                                                                                             |
|               |           Projection: orders.o_orderkey, orders.o_orderdate, orders.o_shippriority                                                                                                                                                                                                                                                      |
|               |             Inner Join: customer.c_custkey = orders.o_custkey                                                                                                                                                                                                                                                                           |
|               |               Projection: customer.c_custkey                                                                                                                                                                                                                                                                                            |
|               |                 Filter: customer.c_mktsegment = Utf8("BUILDING")                                                                                                                                                                                                                                                                        |
|               |                   TableScan: customer projection=[c_custkey, c_mktsegment]                                                                                                                                                                                                                                                              |
|               |               Filter: orders.o_orderdate < Date32("9204")                                                                                                                                                                                                                                                                               |
|               |                 TableScan: orders projection=[o_orderkey, o_custkey, o_orderdate, o_shippriority]                                                                                                                                                                                                                                       |
|               |           Projection: lineitem.l_orderkey, lineitem.l_extendedprice, lineitem.l_discount                                                                                                                                                                                                                                                |
|               |             Filter: lineitem.l_shipdate > Date32("9204")                                                                                                                                                                                                                                                                                |
|               |               TableScan: lineitem projection=[l_orderkey, l_extendedprice, l_discount, l_shipdate]                                                                                                                                                                                                                                      |
| physical_plan | SortPreservingMergeExec: [revenue@1 DESC,o_orderdate@2 ASC NULLS LAST]                                                                                                                                                                                                                                                                  |
|               |   SortExec: expr=[revenue@1 DESC,o_orderdate@2 ASC NULLS LAST]                                                                                                                                                                                                                                                                          |
|               |     ProjectionExec: expr=[l_orderkey@0 as l_orderkey, SUM(lineitem.l_extendedprice * Int64(1) - lineitem.l_discount)@3 as revenue, o_orderdate@1 as o_orderdate, o_shippriority@2 as o_shippriority]                                                                                                                                    |
|               |       AggregateExec: mode=FinalPartitioned, gby=[l_orderkey@0 as l_orderkey, o_orderdate@1 as o_orderdate, o_shippriority@2 as o_shippriority], aggr=[SUM(lineitem.l_extendedprice * Int64(1) - lineitem.l_discount)]                                                                                                                   |
|               |         CoalesceBatchesExec: target_batch_size=8192                                                                                                                                                                                                                                                                                     |
|               |           RepartitionExec: partitioning=Hash([Column { name: "l_orderkey", index: 0 }, Column { name: "o_orderdate", index: 1 }, Column { name: "o_shippriority", index: 2 }], 2), input_partitions=2                                                                                                                                   |
|               |             AggregateExec: mode=Partial, gby=[l_orderkey@2 as l_orderkey, o_orderdate@0 as o_orderdate, o_shippriority@1 as o_shippriority], aggr=[SUM(lineitem.l_extendedprice * Int64(1) - lineitem.l_discount)]                                                                                                                      |
|               |               ProjectionExec: expr=[o_orderdate@1 as o_orderdate, o_shippriority@2 as o_shippriority, l_orderkey@3 as l_orderkey, l_extendedprice@4 as l_extendedprice, l_discount@5 as l_discount]                                                                                                                                     |
|               |                 CoalesceBatchesExec: target_batch_size=8192                                                                                                                                                                                                                                                                             |
|               |                   HashJoinExec: mode=Partitioned, join_type=Inner, on=[(Column { name: "o_orderkey", index: 0 }, Column { name: "l_orderkey", index: 0 })]                                                                                                                                                                              |
|               |                     CoalesceBatchesExec: target_batch_size=8192                                                                                                                                                                                                                                                                         |
|               |                       RepartitionExec: partitioning=Hash([Column { name: "o_orderkey", index: 0 }], 2), input_partitions=2                                                                                                                                                                                                              |
|               |                         ProjectionExec: expr=[o_orderkey@1 as o_orderkey, o_orderdate@3 as o_orderdate, o_shippriority@4 as o_shippriority]                                                                                                                                                                                             |
|               |                           CoalesceBatchesExec: target_batch_size=8192                                                                                                                                                                                                                                                                   |
|               |                             HashJoinExec: mode=Partitioned, join_type=Inner, 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=2                                                                                                                                                                                                     |
|               |                                   RepartitionExec: partitioning=RoundRobinBatch(2), input_partitions=0                                                                                                                                                                                                                                  |
|               |                                     ProjectionExec: expr=[c_custkey@0 as c_custkey]                                                                                                                                                                                                                                                     |
|               |                                       CoalesceBatchesExec: target_batch_size=8192                                                                                                                                                                                                                                                       |
|               |                                         FilterExec: c_mktsegment@1 = BUILDING                                                                                                                                                                                                                                                           |
|               |                                           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                                                                                                                                                                                                                                  |
|               |                                     CoalesceBatchesExec: target_batch_size=8192                                                                                                                                                                                                                                                         |
|               |                                       FilterExec: o_orderdate@2 < 9204                                                                                                                                                                                                                                                                  |
|               |                                         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_extendedprice@1 as l_extendedprice, l_discount@2 as l_discount]                                                                                                                                                                                           |
|               |                             CoalesceBatchesExec: target_batch_size=8192                                                                                                                                                                                                                                                                 |
|               |                               FilterExec: l_shipdate@3 > 9204                                                                                                                                                                                                                                                                           |
|               |                                 MemoryExec: partitions=0, partition_sizes=[]                                                                                                                                                                                                                                                            |
|               |                                                                                                                                                                                                                                                                                                                                         |
+---------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+