+---------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| plan_type     | plan                                                                                                                                                                                                                                                                                                                                                                      |
+---------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| logical_plan  | Projection: CAST(SUM(lineitem.l_extendedprice) AS Float64) / Float64(7) AS avg_yearly                                                                                                                                                                                                                                                                                     |
|               |   Aggregate: groupBy=[[]], aggr=[[SUM(lineitem.l_extendedprice)]]                                                                                                                                                                                                                                                                                                         |
|               |     Projection: lineitem.l_extendedprice                                                                                                                                                                                                                                                                                                                                  |
|               |       Inner Join: part.p_partkey = __scalar_sq_1.l_partkey Filter: CAST(lineitem.l_quantity AS Decimal128(30, 15)) < __scalar_sq_1.__value                                                                                                                                                                                                                                |
|               |         Projection: lineitem.l_quantity, lineitem.l_extendedprice, part.p_partkey                                                                                                                                                                                                                                                                                         |
|               |           Inner Join: lineitem.l_partkey = part.p_partkey                                                                                                                                                                                                                                                                                                                 |
|               |             TableScan: lineitem projection=[l_partkey, l_quantity, l_extendedprice]                                                                                                                                                                                                                                                                                       |
|               |             Projection: part.p_partkey                                                                                                                                                                                                                                                                                                                                    |
|               |               Filter: part.p_brand = Utf8("Brand#23") AND part.p_container = Utf8("MED BOX")                                                                                                                                                                                                                                                                              |
|               |                 TableScan: part projection=[p_partkey, p_brand, p_container]                                                                                                                                                                                                                                                                                              |
|               |         SubqueryAlias: __scalar_sq_1                                                                                                                                                                                                                                                                                                                                      |
|               |           Projection: lineitem.l_partkey, CAST(Float64(0.2) * CAST(AVG(lineitem.l_quantity) AS Float64) AS Decimal128(30, 15)) AS __value                                                                                                                                                                                                                                 |
|               |             Aggregate: groupBy=[[lineitem.l_partkey]], aggr=[[AVG(lineitem.l_quantity)]]                                                                                                                                                                                                                                                                                  |
|               |               TableScan: lineitem projection=[l_partkey, l_quantity]                                                                                                                                                                                                                                                                                                      |
| physical_plan | ProjectionExec: expr=[CAST(SUM(lineitem.l_extendedprice)@0 AS Float64) / 7 as avg_yearly]                                                                                                                                                                                                                                                                                 |
|               |   AggregateExec: mode=Final, gby=[], aggr=[SUM(lineitem.l_extendedprice)]                                                                                                                                                                                                                                                                                                 |
|               |     CoalescePartitionsExec                                                                                                                                                                                                                                                                                                                                                |
|               |       AggregateExec: mode=Partial, gby=[], aggr=[SUM(lineitem.l_extendedprice)]                                                                                                                                                                                                                                                                                           |
|               |         ProjectionExec: expr=[l_extendedprice@1 as l_extendedprice]                                                                                                                                                                                                                                                                                                       |
|               |           CoalesceBatchesExec: target_batch_size=8192                                                                                                                                                                                                                                                                                                                     |
|               |             HashJoinExec: mode=Partitioned, join_type=Inner, on=[(Column { name: "p_partkey", index: 2 }, Column { name: "l_partkey", index: 0 })], filter=BinaryExpr { left: CastExpr { expr: Column { name: "l_quantity", index: 0 }, cast_type: Decimal128(30, 15), cast_options: CastOptions { safe: false } }, op: Lt, right: Column { name: "__value", index: 1 } } |
|               |               CoalesceBatchesExec: target_batch_size=8192                                                                                                                                                                                                                                                                                                                 |
|               |                 RepartitionExec: partitioning=Hash([Column { name: "p_partkey", index: 2 }], 2), input_partitions=2                                                                                                                                                                                                                                                       |
|               |                   RepartitionExec: partitioning=RoundRobinBatch(2), input_partitions=2                                                                                                                                                                                                                                                                                    |
|               |                     ProjectionExec: expr=[l_quantity@1 as l_quantity, l_extendedprice@2 as l_extendedprice, p_partkey@3 as p_partkey]                                                                                                                                                                                                                                     |
|               |                       CoalesceBatchesExec: target_batch_size=8192                                                                                                                                                                                                                                                                                                         |
|               |                         HashJoinExec: mode=Partitioned, join_type=Inner, on=[(Column { name: "l_partkey", index: 0 }, Column { name: "p_partkey", index: 0 })]                                                                                                                                                                                                            |
|               |                           CoalesceBatchesExec: target_batch_size=8192                                                                                                                                                                                                                                                                                                     |
|               |                             RepartitionExec: partitioning=Hash([Column { name: "l_partkey", index: 0 }], 2), input_partitions=0                                                                                                                                                                                                                                           |
|               |                               MemoryExec: partitions=0, partition_sizes=[]                                                                                                                                                                                                                                                                                                |
|               |                           CoalesceBatchesExec: target_batch_size=8192                                                                                                                                                                                                                                                                                                     |
|               |                             RepartitionExec: partitioning=Hash([Column { name: "p_partkey", index: 0 }], 2), input_partitions=2                                                                                                                                                                                                                                           |
|               |                               RepartitionExec: partitioning=RoundRobinBatch(2), input_partitions=0                                                                                                                                                                                                                                                                        |
|               |                                 ProjectionExec: expr=[p_partkey@0 as p_partkey]                                                                                                                                                                                                                                                                                           |
|               |                                   CoalesceBatchesExec: target_batch_size=8192                                                                                                                                                                                                                                                                                             |
|               |                                     FilterExec: p_brand@1 = Brand#23 AND p_container@2 = MED BOX                                                                                                                                                                                                                                                                          |
|               |                                       MemoryExec: partitions=0, partition_sizes=[]                                                                                                                                                                                                                                                                                        |
|               |               ProjectionExec: expr=[l_partkey@0 as l_partkey, CAST(0.2 * CAST(AVG(lineitem.l_quantity)@1 AS Float64) AS Decimal128(30, 15)) as __value]                                                                                                                                                                                                                   |
|               |                 AggregateExec: mode=FinalPartitioned, gby=[l_partkey@0 as l_partkey], aggr=[AVG(lineitem.l_quantity)]                                                                                                                                                                                                                                                     |
|               |                   CoalesceBatchesExec: target_batch_size=8192                                                                                                                                                                                                                                                                                                             |
|               |                     RepartitionExec: partitioning=Hash([Column { name: "l_partkey", index: 0 }], 2), input_partitions=2                                                                                                                                                                                                                                                   |
|               |                       RepartitionExec: partitioning=RoundRobinBatch(2), input_partitions=0                                                                                                                                                                                                                                                                                |
|               |                         AggregateExec: mode=Partial, gby=[l_partkey@0 as l_partkey], aggr=[AVG(lineitem.l_quantity)]                                                                                                                                                                                                                                                      |
|               |                           MemoryExec: partitions=0, partition_sizes=[]                                                                                                                                                                                                                                                                                                    |
|               |                                                                                                                                                                                                                                                                                                                                                                           |
+---------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+