== Physical Plan ==
VeloxColumnarToRow (21)
+- ^ ProjectExecTransformer (19)
   +- ^ RegularHashAggregateExecTransformer (18)
      +- ^ InputIteratorTransformer (17)
         +- ColumnarExchange (15)
            +- VeloxResizeBatches (14)
               +- ^ FlushableHashAggregateExecTransformer (12)
                  +- ^ ProjectExecTransformer (11)
                     +- ^ BroadcastHashJoinExecTransformer Inner BuildRight (10)
                        :- ^ ProjectExecTransformer (3)
                        :  +- ^ FilterExecTransformer (2)
                        :     +- ^ FileSourceScanExecTransformer parquet spark_catalog.default.lineitem (1)
                        +- ^ InputIteratorTransformer (9)
                           +- ColumnarBroadcastExchange (7)
                              +- ^ FilterExecTransformer (5)
                                 +- ^ FileSourceScanExecTransformer parquet spark_catalog.default.part (4)


(1) FileSourceScanExecTransformer parquet spark_catalog.default.lineitem
Output [4]: [l_partkey#1, l_extendedprice#2, l_discount#3, l_shipdate#4]
Batched: true
Location: InMemoryFileIndex [{warehouse_dir}/lineitem]
PushedFilters: [IsNotNull(l_shipdate), GreaterThanOrEqual(l_shipdate,1995-09-01), LessThan(l_shipdate,1995-10-01), IsNotNull(l_partkey)]
ReadSchema: struct<l_partkey:bigint,l_extendedprice:decimal(10,0),l_discount:decimal(10,0),l_shipdate:date>

(2) FilterExecTransformer
Input [4]: [l_partkey#1, l_extendedprice#2, l_discount#3, l_shipdate#4]
Arguments: (((isnotnull(l_shipdate#4) AND (l_shipdate#4 >= 1995-09-01)) AND (l_shipdate#4 < 1995-10-01)) AND isnotnull(l_partkey#1))

(3) ProjectExecTransformer
Output [3]: [l_partkey#1, l_extendedprice#2, l_discount#3]
Input [4]: [l_partkey#1, l_extendedprice#2, l_discount#3, l_shipdate#4]

(4) FileSourceScanExecTransformer parquet spark_catalog.default.part
Output [2]: [p_partkey#5, p_type#6]
Batched: true
Location: InMemoryFileIndex [{warehouse_dir}/part]
PushedFilters: [IsNotNull(p_partkey)]
ReadSchema: struct<p_partkey:bigint,p_type:string>

(5) FilterExecTransformer
Input [2]: [p_partkey#5, p_type#6]
Arguments: isnotnull(p_partkey#5)

(6) WholeStageCodegenTransformer (1)
Input [2]: [p_partkey#5, p_type#6]
Arguments: false

(7) ColumnarBroadcastExchange
Input [2]: [p_partkey#5, p_type#6]
Arguments: HashedRelationBroadcastMode(List(input[0, bigint, false]),false), [plan_id=1]

(8) InputAdapter
Input [2]: [p_partkey#5, p_type#6]

(9) InputIteratorTransformer
Input [2]: [p_partkey#5, p_type#6]

(10) BroadcastHashJoinExecTransformer
Left keys [1]: [l_partkey#1]
Right keys [1]: [p_partkey#5]
Join type: Inner
Join condition: None

(11) ProjectExecTransformer
Output [2]: [CASE WHEN StartsWith(p_type#6, PROMO) THEN (l_extendedprice#2 * (1 - l_discount#3)) ELSE 0 END AS _pre_1#7, (l_extendedprice#2 * (1 - l_discount#3)) AS _pre_2#8]
Input [5]: [l_partkey#1, l_extendedprice#2, l_discount#3, p_partkey#5, p_type#6]

(12) FlushableHashAggregateExecTransformer
Input [2]: [_pre_1#7, _pre_2#8]
Keys: []
Functions [2]: [partial_sum(_pre_1#7), partial_sum(_pre_2#8)]
Aggregate Attributes [4]: [sum#9, isEmpty#10, sum#11, isEmpty#12]
Results [4]: [sum#13, isEmpty#14, sum#15, isEmpty#16]

(13) WholeStageCodegenTransformer (2)
Input [4]: [sum#13, isEmpty#14, sum#15, isEmpty#16]
Arguments: false

(14) VeloxResizeBatches
Input [4]: [sum#13, isEmpty#14, sum#15, isEmpty#16]
Arguments: 1024, 2147483647, 10485760

(15) ColumnarExchange
Input [4]: [sum#13, isEmpty#14, sum#15, isEmpty#16]
Arguments: SinglePartition, ENSURE_REQUIREMENTS, [plan_id=2], [shuffle_writer_type=hash]

(16) InputAdapter
Input [4]: [sum#13, isEmpty#14, sum#15, isEmpty#16]

(17) InputIteratorTransformer
Input [4]: [sum#13, isEmpty#14, sum#15, isEmpty#16]

(18) RegularHashAggregateExecTransformer
Input [4]: [sum#13, isEmpty#14, sum#15, isEmpty#16]
Keys: []
Functions [2]: [sum(CASE WHEN StartsWith(p_type#6, PROMO) THEN (l_extendedprice#2 * (1 - l_discount#3)) ELSE 0 END), sum((l_extendedprice#2 * (1 - l_discount#3)))]
Aggregate Attributes [2]: [sum(CASE WHEN StartsWith(p_type#6, PROMO) THEN (l_extendedprice#2 * (1 - l_discount#3)) ELSE 0 END)#17, sum((l_extendedprice#2 * (1 - l_discount#3)))#18]
Results [2]: [sum(CASE WHEN StartsWith(p_type#6, PROMO) THEN (l_extendedprice#2 * (1 - l_discount#3)) ELSE 0 END)#17, sum((l_extendedprice#2 * (1 - l_discount#3)))#18]

(19) ProjectExecTransformer
Output [1]: [((100.00 * sum(CASE WHEN StartsWith(p_type#6, PROMO) THEN (l_extendedprice#2 * (1 - l_discount#3)) ELSE 0 END)#17) / sum((l_extendedprice#2 * (1 - l_discount#3)))#18) AS promo_revenue#19]
Input [2]: [sum(CASE WHEN StartsWith(p_type#6, PROMO) THEN (l_extendedprice#2 * (1 - l_discount#3)) ELSE 0 END)#17, sum((l_extendedprice#2 * (1 - l_discount#3)))#18]

(20) WholeStageCodegenTransformer (3)
Input [1]: [promo_revenue#19]
Arguments: false

(21) VeloxColumnarToRow
Input [1]: [promo_revenue#19]

