+---------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| plan_type     | plan                                                                                                                                                                                                                                                                                   |
+---------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| logical_plan  | Sort: revenue DESC NULLS FIRST                                                                                                                                                                                                                                                         |
|               |   Projection: nation.n_name, SUM(lineitem.l_extendedprice * Int64(1) - lineitem.l_discount) AS revenue                                                                                                                                                                                 |
|               |     Aggregate: groupBy=[[nation.n_name]], 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: lineitem.l_extendedprice, lineitem.l_discount, nation.n_name                                                                                                                                                                                                         |
|               |         Inner Join: nation.n_regionkey = region.r_regionkey                                                                                                                                                                                                                            |
|               |           Projection: lineitem.l_extendedprice, lineitem.l_discount, nation.n_name, nation.n_regionkey                                                                                                                                                                                 |
|               |             Inner Join: supplier.s_nationkey = nation.n_nationkey                                                                                                                                                                                                                      |
|               |               Projection: lineitem.l_extendedprice, lineitem.l_discount, supplier.s_nationkey                                                                                                                                                                                          |
|               |                 Inner Join: lineitem.l_suppkey = supplier.s_suppkey, customer.c_nationkey = supplier.s_nationkey                                                                                                                                                                       |
|               |                   Projection: customer.c_nationkey, lineitem.l_suppkey, lineitem.l_extendedprice, lineitem.l_discount                                                                                                                                                                  |
|               |                     Inner Join: orders.o_orderkey = lineitem.l_orderkey                                                                                                                                                                                                                |
|               |                       Projection: customer.c_nationkey, orders.o_orderkey                                                                                                                                                                                                              |
|               |                         Inner Join: customer.c_custkey = orders.o_custkey                                                                                                                                                                                                              |
|               |                           TableScan: customer projection=[c_custkey, c_nationkey]                                                                                                                                                                                                      |
|               |                           Projection: orders.o_orderkey, orders.o_custkey                                                                                                                                                                                                              |
|               |                             Filter: orders.o_orderdate >= Date32("8766") AND orders.o_orderdate < Date32("9131")                                                                                                                                                                       |
|               |                               TableScan: orders projection=[o_orderkey, o_custkey, o_orderdate]                                                                                                                                                                                        |
|               |                       TableScan: lineitem projection=[l_orderkey, l_suppkey, l_extendedprice, l_discount]                                                                                                                                                                              |
|               |                   TableScan: supplier projection=[s_suppkey, s_nationkey]                                                                                                                                                                                                              |
|               |               TableScan: nation projection=[n_nationkey, n_name, n_regionkey]                                                                                                                                                                                                          |
|               |           Projection: region.r_regionkey                                                                                                                                                                                                                                               |
|               |             Filter: region.r_name = Utf8("ASIA")                                                                                                                                                                                                                                       |
|               |               TableScan: region projection=[r_regionkey, r_name]                                                                                                                                                                                                                       |
| physical_plan | SortPreservingMergeExec: [revenue@1 DESC]                                                                                                                                                                                                                                              |
|               |   SortExec: expr=[revenue@1 DESC]                                                                                                                                                                                                                                                      |
|               |     ProjectionExec: expr=[n_name@0 as n_name, SUM(lineitem.l_extendedprice * Int64(1) - lineitem.l_discount)@1 as revenue]                                                                                                                                                             |
|               |       AggregateExec: mode=FinalPartitioned, gby=[n_name@0 as n_name], aggr=[SUM(lineitem.l_extendedprice * Int64(1) - lineitem.l_discount)]                                                                                                                                            |
|               |         CoalesceBatchesExec: target_batch_size=8192                                                                                                                                                                                                                                    |
|               |           RepartitionExec: partitioning=Hash([Column { name: "n_name", index: 0 }], 2), input_partitions=2                                                                                                                                                                             |
|               |             AggregateExec: mode=Partial, gby=[n_name@2 as n_name], aggr=[SUM(lineitem.l_extendedprice * Int64(1) - lineitem.l_discount)]                                                                                                                                               |
|               |               ProjectionExec: expr=[l_extendedprice@0 as l_extendedprice, l_discount@1 as l_discount, n_name@2 as n_name]                                                                                                                                                              |
|               |                 CoalesceBatchesExec: target_batch_size=8192                                                                                                                                                                                                                            |
|               |                   HashJoinExec: mode=Partitioned, join_type=Inner, on=[(Column { name: "n_regionkey", index: 3 }, Column { name: "r_regionkey", index: 0 })]                                                                                                                           |
|               |                     CoalesceBatchesExec: target_batch_size=8192                                                                                                                                                                                                                        |
|               |                       RepartitionExec: partitioning=Hash([Column { name: "n_regionkey", index: 3 }], 2), input_partitions=2                                                                                                                                                            |
|               |                         ProjectionExec: expr=[l_extendedprice@0 as l_extendedprice, l_discount@1 as l_discount, n_name@4 as n_name, n_regionkey@5 as n_regionkey]                                                                                                                      |
|               |                           CoalesceBatchesExec: target_batch_size=8192                                                                                                                                                                                                                  |
|               |                             HashJoinExec: mode=Partitioned, join_type=Inner, on=[(Column { name: "s_nationkey", index: 2 }, Column { name: "n_nationkey", index: 0 })]                                                                                                                 |
|               |                               CoalesceBatchesExec: target_batch_size=8192                                                                                                                                                                                                              |
|               |                                 RepartitionExec: partitioning=Hash([Column { name: "s_nationkey", index: 2 }], 2), input_partitions=2                                                                                                                                                  |
|               |                                   ProjectionExec: expr=[l_extendedprice@2 as l_extendedprice, l_discount@3 as l_discount, s_nationkey@5 as s_nationkey]                                                                                                                                |
|               |                                     CoalesceBatchesExec: target_batch_size=8192                                                                                                                                                                                                        |
|               |                                       HashJoinExec: mode=Partitioned, join_type=Inner, on=[(Column { name: "l_suppkey", index: 1 }, Column { name: "s_suppkey", index: 0 }), (Column { name: "c_nationkey", index: 0 }, Column { name: "s_nationkey", index: 1 })]                     |
|               |                                         CoalesceBatchesExec: target_batch_size=8192                                                                                                                                                                                                    |
|               |                                           RepartitionExec: partitioning=Hash([Column { name: "l_suppkey", index: 1 }, Column { name: "c_nationkey", index: 0 }], 2), input_partitions=2                                                                                                |
|               |                                             ProjectionExec: expr=[c_nationkey@0 as c_nationkey, l_suppkey@3 as l_suppkey, 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: 1 }, Column { name: "l_orderkey", index: 0 })]                                                                                               |
|               |                                                   CoalesceBatchesExec: target_batch_size=8192                                                                                                                                                                                          |
|               |                                                     RepartitionExec: partitioning=Hash([Column { name: "o_orderkey", index: 1 }], 2), input_partitions=2                                                                                                                               |
|               |                                                       RepartitionExec: partitioning=RoundRobinBatch(2), input_partitions=2                                                                                                                                                             |
|               |                                                         ProjectionExec: expr=[c_nationkey@1 as c_nationkey, o_orderkey@2 as o_orderkey]                                                                                                                                                |
|               |                                                           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=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_orderdate@2 >= 8766 AND o_orderdate@2 < 9131                                                                                                                                                     |
|               |                                                                           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: "s_suppkey", index: 0 }, Column { name: "s_nationkey", index: 1 }], 2), input_partitions=0                                                                                                |
|               |                                             MemoryExec: partitions=0, partition_sizes=[]                                                                                                                                                                                               |
|               |                               CoalesceBatchesExec: target_batch_size=8192                                                                                                                                                                                                              |
|               |                                 RepartitionExec: partitioning=Hash([Column { name: "n_nationkey", index: 0 }], 2), input_partitions=0                                                                                                                                                  |
|               |                                   MemoryExec: partitions=0, partition_sizes=[]                                                                                                                                                                                                         |
|               |                     CoalesceBatchesExec: target_batch_size=8192                                                                                                                                                                                                                        |
|               |                       RepartitionExec: partitioning=Hash([Column { name: "r_regionkey", index: 0 }], 2), input_partitions=2                                                                                                                                                            |
|               |                         RepartitionExec: partitioning=RoundRobinBatch(2), input_partitions=0                                                                                                                                                                                           |
|               |                           ProjectionExec: expr=[r_regionkey@0 as r_regionkey]                                                                                                                                                                                                          |
|               |                             CoalesceBatchesExec: target_batch_size=8192                                                                                                                                                                                                                |
|               |                               FilterExec: r_name@1 = ASIA                                                                                                                                                                                                                              |
|               |                                 MemoryExec: partitions=0, partition_sizes=[]                                                                                                                                                                                                           |
|               |                                                                                                                                                                                                                                                                                        |
+---------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+