== Physical Plan ==
* CometColumnarToRow (90)
+- CometTakeOrderedAndProject (89)
   +- CometUnion (88)
      :- CometHashAggregate (64)
      :  +- CometExchange (63)
      :     +- CometHashAggregate (62)
      :        +- CometProject (61)
      :           +- CometBroadcastHashJoin (60)
      :              :- CometProject (55)
      :              :  +- CometBroadcastHashJoin (54)
      :              :     :- CometSortMergeJoin (41)
      :              :     :  :- CometSort (26)
      :              :     :  :  +- CometColumnarExchange (25)
      :              :     :  :     +- * Project (24)
      :              :     :  :        +- * BroadcastHashJoin LeftSemi BuildRight (23)
      :              :     :  :           :- * Filter (3)
      :              :     :  :           :  +- * ColumnarToRow (2)
      :              :     :  :           :     +- Scan parquet spark_catalog.default.catalog_sales (1)
      :              :     :  :           +- BroadcastExchange (22)
      :              :     :  :              +- * Project (21)
      :              :     :  :                 +- * Filter (20)
      :              :     :  :                    +- * HashAggregate (19)
      :              :     :  :                       +- * CometColumnarToRow (18)
      :              :     :  :                          +- CometColumnarExchange (17)
      :              :     :  :                             +- * HashAggregate (16)
      :              :     :  :                                +- * Project (15)
      :              :     :  :                                   +- * BroadcastHashJoin Inner BuildRight (14)
      :              :     :  :                                      :- * Project (9)
      :              :     :  :                                      :  +- * BroadcastHashJoin Inner BuildRight (8)
      :              :     :  :                                      :     :- * Filter (6)
      :              :     :  :                                      :     :  +- * ColumnarToRow (5)
      :              :     :  :                                      :     :     +- Scan parquet spark_catalog.default.store_sales (4)
      :              :     :  :                                      :     +- ReusedExchange (7)
      :              :     :  :                                      +- BroadcastExchange (13)
      :              :     :  :                                         +- * CometColumnarToRow (12)
      :              :     :  :                                            +- CometFilter (11)
      :              :     :  :                                               +- CometNativeScan parquet spark_catalog.default.item (10)
      :              :     :  +- CometSort (40)
      :              :     :     +- CometProject (39)
      :              :     :        +- CometFilter (38)
      :              :     :           +- CometHashAggregate (37)
      :              :     :              +- CometExchange (36)
      :              :     :                 +- CometHashAggregate (35)
      :              :     :                    +- CometProject (34)
      :              :     :                       +- CometBroadcastHashJoin (33)
      :              :     :                          :- CometProject (29)
      :              :     :                          :  +- CometFilter (28)
      :              :     :                          :     +- CometNativeScan parquet spark_catalog.default.store_sales (27)
      :              :     :                          +- CometBroadcastExchange (32)
      :              :     :                             +- CometFilter (31)
      :              :     :                                +- CometNativeScan parquet spark_catalog.default.customer (30)
      :              :     +- CometBroadcastExchange (53)
      :              :        +- CometProject (52)
      :              :           +- CometSortMergeJoin (51)
      :              :              :- CometSort (45)
      :              :              :  +- CometExchange (44)
      :              :              :     +- CometFilter (43)
      :              :              :        +- CometNativeScan parquet spark_catalog.default.customer (42)
      :              :              +- CometSort (50)
      :              :                 +- CometProject (49)
      :              :                    +- CometFilter (48)
      :              :                       +- CometHashAggregate (47)
      :              :                          +- ReusedExchange (46)
      :              +- CometBroadcastExchange (59)
      :                 +- CometProject (58)
      :                    +- CometFilter (57)
      :                       +- CometNativeScan parquet spark_catalog.default.date_dim (56)
      +- CometHashAggregate (87)
         +- CometExchange (86)
            +- CometHashAggregate (85)
               +- CometProject (84)
                  +- CometBroadcastHashJoin (83)
                     :- CometProject (81)
                     :  +- CometBroadcastHashJoin (80)
                     :     :- CometSortMergeJoin (78)
                     :     :  :- CometSort (72)
                     :     :  :  +- CometColumnarExchange (71)
                     :     :  :     +- * Project (70)
                     :     :  :        +- * BroadcastHashJoin LeftSemi BuildRight (69)
                     :     :  :           :- * Filter (67)
                     :     :  :           :  +- * ColumnarToRow (66)
                     :     :  :           :     +- Scan parquet spark_catalog.default.web_sales (65)
                     :     :  :           +- ReusedExchange (68)
                     :     :  +- CometSort (77)
                     :     :     +- CometProject (76)
                     :     :        +- CometFilter (75)
                     :     :           +- CometHashAggregate (74)
                     :     :              +- ReusedExchange (73)
                     :     +- ReusedExchange (79)
                     +- ReusedExchange (82)


(1) Scan parquet spark_catalog.default.catalog_sales
Output [5]: [cs_bill_customer_sk#1, cs_item_sk#2, cs_quantity#3, cs_list_price#4, cs_sold_date_sk#5]
Batched: true
Location: InMemoryFileIndex []
PartitionFilters: [isnotnull(cs_sold_date_sk#5), dynamicpruningexpression(cs_sold_date_sk#5 IN dynamicpruning#6)]
PushedFilters: [IsNotNull(cs_bill_customer_sk)]
ReadSchema: struct<cs_bill_customer_sk:int,cs_item_sk:int,cs_quantity:int,cs_list_price:decimal(7,2)>

(2) ColumnarToRow [codegen id : 5]
Input [5]: [cs_bill_customer_sk#1, cs_item_sk#2, cs_quantity#3, cs_list_price#4, cs_sold_date_sk#5]

(3) Filter [codegen id : 5]
Input [5]: [cs_bill_customer_sk#1, cs_item_sk#2, cs_quantity#3, cs_list_price#4, cs_sold_date_sk#5]
Condition : isnotnull(cs_bill_customer_sk#1)

(4) Scan parquet spark_catalog.default.store_sales
Output [2]: [ss_item_sk#7, ss_sold_date_sk#8]
Batched: true
Location: InMemoryFileIndex []
PartitionFilters: [isnotnull(ss_sold_date_sk#8), dynamicpruningexpression(ss_sold_date_sk#8 IN dynamicpruning#9)]
PushedFilters: [IsNotNull(ss_item_sk)]
ReadSchema: struct<ss_item_sk:int>

(5) ColumnarToRow [codegen id : 3]
Input [2]: [ss_item_sk#7, ss_sold_date_sk#8]

(6) Filter [codegen id : 3]
Input [2]: [ss_item_sk#7, ss_sold_date_sk#8]
Condition : isnotnull(ss_item_sk#7)

(7) ReusedExchange [Reuses operator id: 100]
Output [2]: [d_date_sk#10, d_date#11]

(8) BroadcastHashJoin [codegen id : 3]
Left keys [1]: [ss_sold_date_sk#8]
Right keys [1]: [d_date_sk#10]
Join type: Inner
Join condition: None

(9) Project [codegen id : 3]
Output [2]: [ss_item_sk#7, d_date#11]
Input [4]: [ss_item_sk#7, ss_sold_date_sk#8, d_date_sk#10, d_date#11]

(10) CometNativeScan parquet spark_catalog.default.item
Output [2]: [i_item_sk#12, i_item_desc#13]
Batched: true
Location [not included in comparison]/{warehouse_dir}/item]
PushedFilters: [IsNotNull(i_item_sk)]
ReadSchema: struct<i_item_sk:int,i_item_desc:string>

(11) CometFilter
Input [2]: [i_item_sk#12, i_item_desc#13]
Condition : isnotnull(i_item_sk#12)

(12) CometColumnarToRow [codegen id : 2]
Input [2]: [i_item_sk#12, i_item_desc#13]

(13) BroadcastExchange
Input [2]: [i_item_sk#12, i_item_desc#13]
Arguments: HashedRelationBroadcastMode(List(cast(input[0, int, false] as bigint)),false), [plan_id=1]

(14) BroadcastHashJoin [codegen id : 3]
Left keys [1]: [ss_item_sk#7]
Right keys [1]: [i_item_sk#12]
Join type: Inner
Join condition: None

(15) Project [codegen id : 3]
Output [3]: [d_date#11, i_item_sk#12, substr(i_item_desc#13, 1, 30) AS _groupingexpression#14]
Input [4]: [ss_item_sk#7, d_date#11, i_item_sk#12, i_item_desc#13]

(16) HashAggregate [codegen id : 3]
Input [3]: [d_date#11, i_item_sk#12, _groupingexpression#14]
Keys [3]: [_groupingexpression#14, i_item_sk#12, d_date#11]
Functions [1]: [partial_count(1)]
Aggregate Attributes [1]: [count#15]
Results [4]: [_groupingexpression#14, i_item_sk#12, d_date#11, count#16]

(17) CometColumnarExchange
Input [4]: [_groupingexpression#14, i_item_sk#12, d_date#11, count#16]
Arguments: hashpartitioning(_groupingexpression#14, i_item_sk#12, d_date#11, 5), ENSURE_REQUIREMENTS, CometColumnarShuffle, [plan_id=2]

(18) CometColumnarToRow [codegen id : 4]
Input [4]: [_groupingexpression#14, i_item_sk#12, d_date#11, count#16]

(19) HashAggregate [codegen id : 4]
Input [4]: [_groupingexpression#14, i_item_sk#12, d_date#11, count#16]
Keys [3]: [_groupingexpression#14, i_item_sk#12, d_date#11]
Functions [1]: [count(1)]
Aggregate Attributes [1]: [count(1)#17]
Results [2]: [i_item_sk#12 AS item_sk#18, count(1)#17 AS cnt#19]

(20) Filter [codegen id : 4]
Input [2]: [item_sk#18, cnt#19]
Condition : (cnt#19 > 4)

(21) Project [codegen id : 4]
Output [1]: [item_sk#18]
Input [2]: [item_sk#18, cnt#19]

(22) BroadcastExchange
Input [1]: [item_sk#18]
Arguments: HashedRelationBroadcastMode(List(cast(input[0, int, true] as bigint)),false), [plan_id=3]

(23) BroadcastHashJoin [codegen id : 5]
Left keys [1]: [cs_item_sk#2]
Right keys [1]: [item_sk#18]
Join type: LeftSemi
Join condition: None

(24) Project [codegen id : 5]
Output [4]: [cs_bill_customer_sk#1, cs_quantity#3, cs_list_price#4, cs_sold_date_sk#5]
Input [5]: [cs_bill_customer_sk#1, cs_item_sk#2, cs_quantity#3, cs_list_price#4, cs_sold_date_sk#5]

(25) CometColumnarExchange
Input [4]: [cs_bill_customer_sk#1, cs_quantity#3, cs_list_price#4, cs_sold_date_sk#5]
Arguments: hashpartitioning(cs_bill_customer_sk#1, 5), ENSURE_REQUIREMENTS, CometColumnarShuffle, [plan_id=4]

(26) CometSort
Input [4]: [cs_bill_customer_sk#1, cs_quantity#3, cs_list_price#4, cs_sold_date_sk#5]
Arguments: [cs_bill_customer_sk#1, cs_quantity#3, cs_list_price#4, cs_sold_date_sk#5], [cs_bill_customer_sk#1 ASC NULLS FIRST]

(27) CometNativeScan parquet spark_catalog.default.store_sales
Output [4]: [ss_customer_sk#20, ss_quantity#21, ss_sales_price#22, ss_sold_date_sk#23]
Batched: true
Location [not included in comparison]/{warehouse_dir}/store_sales]
PushedFilters: [IsNotNull(ss_customer_sk)]
ReadSchema: struct<ss_customer_sk:int,ss_quantity:int,ss_sales_price:decimal(7,2)>

(28) CometFilter
Input [4]: [ss_customer_sk#20, ss_quantity#21, ss_sales_price#22, ss_sold_date_sk#23]
Condition : isnotnull(ss_customer_sk#20)

(29) CometProject
Input [4]: [ss_customer_sk#20, ss_quantity#21, ss_sales_price#22, ss_sold_date_sk#23]
Arguments: [ss_customer_sk#20, ss_quantity#21, ss_sales_price#22], [ss_customer_sk#20, ss_quantity#21, ss_sales_price#22]

(30) CometNativeScan parquet spark_catalog.default.customer
Output [1]: [c_customer_sk#24]
Batched: true
Location [not included in comparison]/{warehouse_dir}/customer]
PushedFilters: [IsNotNull(c_customer_sk)]
ReadSchema: struct<c_customer_sk:int>

(31) CometFilter
Input [1]: [c_customer_sk#24]
Condition : isnotnull(c_customer_sk#24)

(32) CometBroadcastExchange
Input [1]: [c_customer_sk#24]
Arguments: [c_customer_sk#24]

(33) CometBroadcastHashJoin
Left output [3]: [ss_customer_sk#20, ss_quantity#21, ss_sales_price#22]
Right output [1]: [c_customer_sk#24]
Arguments: [ss_customer_sk#20], [c_customer_sk#24], Inner, BuildRight

(34) CometProject
Input [4]: [ss_customer_sk#20, ss_quantity#21, ss_sales_price#22, c_customer_sk#24]
Arguments: [ss_quantity#21, ss_sales_price#22, c_customer_sk#24], [ss_quantity#21, ss_sales_price#22, c_customer_sk#24]

(35) CometHashAggregate
Input [3]: [ss_quantity#21, ss_sales_price#22, c_customer_sk#24]
Keys [1]: [c_customer_sk#24]
Functions [1]: [partial_sum((cast(ss_quantity#21 as decimal(10,0)) * ss_sales_price#22))]

(36) CometExchange
Input [3]: [c_customer_sk#24, sum#25, isEmpty#26]
Arguments: hashpartitioning(c_customer_sk#24, 5), ENSURE_REQUIREMENTS, CometNativeShuffle, [plan_id=5]

(37) CometHashAggregate
Input [3]: [c_customer_sk#24, sum#25, isEmpty#26]
Keys [1]: [c_customer_sk#24]
Functions [1]: [sum((cast(ss_quantity#21 as decimal(10,0)) * ss_sales_price#22))]

(38) CometFilter
Input [2]: [c_customer_sk#24, ssales#27]
Condition : (isnotnull(ssales#27) AND (cast(ssales#27 as decimal(38,8)) > (0.500000 * Subquery scalar-subquery#28, [id=#29])))

(39) CometProject
Input [2]: [c_customer_sk#24, ssales#27]
Arguments: [c_customer_sk#24], [c_customer_sk#24]

(40) CometSort
Input [1]: [c_customer_sk#24]
Arguments: [c_customer_sk#24], [c_customer_sk#24 ASC NULLS FIRST]

(41) CometSortMergeJoin
Left output [4]: [cs_bill_customer_sk#1, cs_quantity#3, cs_list_price#4, cs_sold_date_sk#5]
Right output [1]: [c_customer_sk#24]
Arguments: [cs_bill_customer_sk#1], [c_customer_sk#24], LeftSemi

(42) CometNativeScan parquet spark_catalog.default.customer
Output [3]: [c_customer_sk#30, c_first_name#31, c_last_name#32]
Batched: true
Location [not included in comparison]/{warehouse_dir}/customer]
PushedFilters: [IsNotNull(c_customer_sk)]
ReadSchema: struct<c_customer_sk:int,c_first_name:string,c_last_name:string>

(43) CometFilter
Input [3]: [c_customer_sk#30, c_first_name#31, c_last_name#32]
Condition : isnotnull(c_customer_sk#30)

(44) CometExchange
Input [3]: [c_customer_sk#30, c_first_name#31, c_last_name#32]
Arguments: hashpartitioning(c_customer_sk#30, 5), ENSURE_REQUIREMENTS, CometNativeShuffle, [plan_id=6]

(45) CometSort
Input [3]: [c_customer_sk#30, c_first_name#31, c_last_name#32]
Arguments: [c_customer_sk#30, c_first_name#31, c_last_name#32], [c_customer_sk#30 ASC NULLS FIRST]

(46) ReusedExchange [Reuses operator id: 36]
Output [3]: [c_customer_sk#24, sum#25, isEmpty#26]

(47) CometHashAggregate
Input [3]: [c_customer_sk#24, sum#25, isEmpty#26]
Keys [1]: [c_customer_sk#24]
Functions [1]: [sum((cast(ss_quantity#21 as decimal(10,0)) * ss_sales_price#22))]

(48) CometFilter
Input [2]: [c_customer_sk#24, ssales#27]
Condition : (isnotnull(ssales#27) AND (cast(ssales#27 as decimal(38,8)) > (0.500000 * ReusedSubquery Subquery scalar-subquery#28, [id=#29])))

(49) CometProject
Input [2]: [c_customer_sk#24, ssales#27]
Arguments: [c_customer_sk#24], [c_customer_sk#24]

(50) CometSort
Input [1]: [c_customer_sk#24]
Arguments: [c_customer_sk#24], [c_customer_sk#24 ASC NULLS FIRST]

(51) CometSortMergeJoin
Left output [3]: [c_customer_sk#30, c_first_name#31, c_last_name#32]
Right output [1]: [c_customer_sk#24]
Arguments: [c_customer_sk#30], [c_customer_sk#24], LeftSemi

(52) CometProject
Input [3]: [c_customer_sk#30, c_first_name#31, c_last_name#32]
Arguments: [c_customer_sk#30, c_first_name#33, c_last_name#34], [c_customer_sk#30, staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, c_first_name#31, 20, true, false, true) AS c_first_name#33, staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, c_last_name#32, 30, true, false, true) AS c_last_name#34]

(53) CometBroadcastExchange
Input [3]: [c_customer_sk#30, c_first_name#33, c_last_name#34]
Arguments: [c_customer_sk#30, c_first_name#33, c_last_name#34]

(54) CometBroadcastHashJoin
Left output [4]: [cs_bill_customer_sk#1, cs_quantity#3, cs_list_price#4, cs_sold_date_sk#5]
Right output [3]: [c_customer_sk#30, c_first_name#33, c_last_name#34]
Arguments: [cs_bill_customer_sk#1], [c_customer_sk#30], Inner, BuildRight

(55) CometProject
Input [7]: [cs_bill_customer_sk#1, cs_quantity#3, cs_list_price#4, cs_sold_date_sk#5, c_customer_sk#30, c_first_name#33, c_last_name#34]
Arguments: [cs_quantity#3, cs_list_price#4, cs_sold_date_sk#5, c_first_name#33, c_last_name#34], [cs_quantity#3, cs_list_price#4, cs_sold_date_sk#5, c_first_name#33, c_last_name#34]

(56) CometNativeScan parquet spark_catalog.default.date_dim
Output [3]: [d_date_sk#35, d_year#36, d_moy#37]
Batched: true
Location [not included in comparison]/{warehouse_dir}/date_dim]
PushedFilters: [IsNotNull(d_year), IsNotNull(d_moy), EqualTo(d_year,2000), EqualTo(d_moy,2), IsNotNull(d_date_sk)]
ReadSchema: struct<d_date_sk:int,d_year:int,d_moy:int>

(57) CometFilter
Input [3]: [d_date_sk#35, d_year#36, d_moy#37]
Condition : ((((isnotnull(d_year#36) AND isnotnull(d_moy#37)) AND (d_year#36 = 2000)) AND (d_moy#37 = 2)) AND isnotnull(d_date_sk#35))

(58) CometProject
Input [3]: [d_date_sk#35, d_year#36, d_moy#37]
Arguments: [d_date_sk#35], [d_date_sk#35]

(59) CometBroadcastExchange
Input [1]: [d_date_sk#35]
Arguments: [d_date_sk#35]

(60) CometBroadcastHashJoin
Left output [5]: [cs_quantity#3, cs_list_price#4, cs_sold_date_sk#5, c_first_name#33, c_last_name#34]
Right output [1]: [d_date_sk#35]
Arguments: [cs_sold_date_sk#5], [d_date_sk#35], Inner, BuildRight

(61) CometProject
Input [6]: [cs_quantity#3, cs_list_price#4, cs_sold_date_sk#5, c_first_name#33, c_last_name#34, d_date_sk#35]
Arguments: [cs_quantity#3, cs_list_price#4, c_first_name#33, c_last_name#34], [cs_quantity#3, cs_list_price#4, c_first_name#33, c_last_name#34]

(62) CometHashAggregate
Input [4]: [cs_quantity#3, cs_list_price#4, c_first_name#33, c_last_name#34]
Keys [2]: [c_last_name#34, c_first_name#33]
Functions [1]: [partial_sum((cast(cs_quantity#3 as decimal(10,0)) * cs_list_price#4))]

(63) CometExchange
Input [4]: [c_last_name#34, c_first_name#33, sum#38, isEmpty#39]
Arguments: hashpartitioning(c_last_name#34, c_first_name#33, 5), ENSURE_REQUIREMENTS, CometNativeShuffle, [plan_id=7]

(64) CometHashAggregate
Input [4]: [c_last_name#34, c_first_name#33, sum#38, isEmpty#39]
Keys [2]: [c_last_name#34, c_first_name#33]
Functions [1]: [sum((cast(cs_quantity#3 as decimal(10,0)) * cs_list_price#4))]

(65) Scan parquet spark_catalog.default.web_sales
Output [5]: [ws_item_sk#40, ws_bill_customer_sk#41, ws_quantity#42, ws_list_price#43, ws_sold_date_sk#44]
Batched: true
Location: InMemoryFileIndex []
PartitionFilters: [isnotnull(ws_sold_date_sk#44), dynamicpruningexpression(ws_sold_date_sk#44 IN dynamicpruning#6)]
PushedFilters: [IsNotNull(ws_bill_customer_sk)]
ReadSchema: struct<ws_item_sk:int,ws_bill_customer_sk:int,ws_quantity:int,ws_list_price:decimal(7,2)>

(66) ColumnarToRow [codegen id : 10]
Input [5]: [ws_item_sk#40, ws_bill_customer_sk#41, ws_quantity#42, ws_list_price#43, ws_sold_date_sk#44]

(67) Filter [codegen id : 10]
Input [5]: [ws_item_sk#40, ws_bill_customer_sk#41, ws_quantity#42, ws_list_price#43, ws_sold_date_sk#44]
Condition : isnotnull(ws_bill_customer_sk#41)

(68) ReusedExchange [Reuses operator id: 22]
Output [1]: [item_sk#45]

(69) BroadcastHashJoin [codegen id : 10]
Left keys [1]: [ws_item_sk#40]
Right keys [1]: [item_sk#45]
Join type: LeftSemi
Join condition: None

(70) Project [codegen id : 10]
Output [4]: [ws_bill_customer_sk#41, ws_quantity#42, ws_list_price#43, ws_sold_date_sk#44]
Input [5]: [ws_item_sk#40, ws_bill_customer_sk#41, ws_quantity#42, ws_list_price#43, ws_sold_date_sk#44]

(71) CometColumnarExchange
Input [4]: [ws_bill_customer_sk#41, ws_quantity#42, ws_list_price#43, ws_sold_date_sk#44]
Arguments: hashpartitioning(ws_bill_customer_sk#41, 5), ENSURE_REQUIREMENTS, CometColumnarShuffle, [plan_id=8]

(72) CometSort
Input [4]: [ws_bill_customer_sk#41, ws_quantity#42, ws_list_price#43, ws_sold_date_sk#44]
Arguments: [ws_bill_customer_sk#41, ws_quantity#42, ws_list_price#43, ws_sold_date_sk#44], [ws_bill_customer_sk#41 ASC NULLS FIRST]

(73) ReusedExchange [Reuses operator id: 36]
Output [3]: [c_customer_sk#46, sum#47, isEmpty#48]

(74) CometHashAggregate
Input [3]: [c_customer_sk#46, sum#47, isEmpty#48]
Keys [1]: [c_customer_sk#46]
Functions [1]: [sum((cast(ss_quantity#49 as decimal(10,0)) * ss_sales_price#50))]

(75) CometFilter
Input [2]: [c_customer_sk#46, ssales#51]
Condition : (isnotnull(ssales#51) AND (cast(ssales#51 as decimal(38,8)) > (0.500000 * ReusedSubquery Subquery scalar-subquery#28, [id=#29])))

(76) CometProject
Input [2]: [c_customer_sk#46, ssales#51]
Arguments: [c_customer_sk#46], [c_customer_sk#46]

(77) CometSort
Input [1]: [c_customer_sk#46]
Arguments: [c_customer_sk#46], [c_customer_sk#46 ASC NULLS FIRST]

(78) CometSortMergeJoin
Left output [4]: [ws_bill_customer_sk#41, ws_quantity#42, ws_list_price#43, ws_sold_date_sk#44]
Right output [1]: [c_customer_sk#46]
Arguments: [ws_bill_customer_sk#41], [c_customer_sk#46], LeftSemi

(79) ReusedExchange [Reuses operator id: 53]
Output [3]: [c_customer_sk#52, c_first_name#53, c_last_name#54]

(80) CometBroadcastHashJoin
Left output [4]: [ws_bill_customer_sk#41, ws_quantity#42, ws_list_price#43, ws_sold_date_sk#44]
Right output [3]: [c_customer_sk#52, c_first_name#53, c_last_name#54]
Arguments: [ws_bill_customer_sk#41], [c_customer_sk#52], Inner, BuildRight

(81) CometProject
Input [7]: [ws_bill_customer_sk#41, ws_quantity#42, ws_list_price#43, ws_sold_date_sk#44, c_customer_sk#52, c_first_name#53, c_last_name#54]
Arguments: [ws_quantity#42, ws_list_price#43, ws_sold_date_sk#44, c_first_name#53, c_last_name#54], [ws_quantity#42, ws_list_price#43, ws_sold_date_sk#44, c_first_name#53, c_last_name#54]

(82) ReusedExchange [Reuses operator id: 59]
Output [1]: [d_date_sk#55]

(83) CometBroadcastHashJoin
Left output [5]: [ws_quantity#42, ws_list_price#43, ws_sold_date_sk#44, c_first_name#53, c_last_name#54]
Right output [1]: [d_date_sk#55]
Arguments: [ws_sold_date_sk#44], [d_date_sk#55], Inner, BuildRight

(84) CometProject
Input [6]: [ws_quantity#42, ws_list_price#43, ws_sold_date_sk#44, c_first_name#53, c_last_name#54, d_date_sk#55]
Arguments: [ws_quantity#42, ws_list_price#43, c_first_name#53, c_last_name#54], [ws_quantity#42, ws_list_price#43, c_first_name#53, c_last_name#54]

(85) CometHashAggregate
Input [4]: [ws_quantity#42, ws_list_price#43, c_first_name#53, c_last_name#54]
Keys [2]: [c_last_name#54, c_first_name#53]
Functions [1]: [partial_sum((cast(ws_quantity#42 as decimal(10,0)) * ws_list_price#43))]

(86) CometExchange
Input [4]: [c_last_name#54, c_first_name#53, sum#56, isEmpty#57]
Arguments: hashpartitioning(c_last_name#54, c_first_name#53, 5), ENSURE_REQUIREMENTS, CometNativeShuffle, [plan_id=9]

(87) CometHashAggregate
Input [4]: [c_last_name#54, c_first_name#53, sum#56, isEmpty#57]
Keys [2]: [c_last_name#54, c_first_name#53]
Functions [1]: [sum((cast(ws_quantity#42 as decimal(10,0)) * ws_list_price#43))]

(88) CometUnion
Child 0 Input [3]: [c_last_name#34, c_first_name#33, sales#58]
Child 1 Input [3]: [c_last_name#54, c_first_name#53, sales#59]

(89) CometTakeOrderedAndProject
Input [3]: [c_last_name#34, c_first_name#33, sales#58]
Arguments: TakeOrderedAndProject(limit=100, orderBy=[c_last_name#34 ASC NULLS FIRST,c_first_name#33 ASC NULLS FIRST,sales#58 ASC NULLS FIRST], output=[c_last_name#34,c_first_name#33,sales#58]), [c_last_name#34, c_first_name#33, sales#58], 100, 0, [c_last_name#34 ASC NULLS FIRST, c_first_name#33 ASC NULLS FIRST, sales#58 ASC NULLS FIRST], [c_last_name#34, c_first_name#33, sales#58]

(90) CometColumnarToRow [codegen id : 11]
Input [3]: [c_last_name#34, c_first_name#33, sales#58]

===== Subqueries =====

Subquery:1 Hosting operator id = 1 Hosting Expression = cs_sold_date_sk#5 IN dynamicpruning#6
BroadcastExchange (95)
+- * CometColumnarToRow (94)
   +- CometProject (93)
      +- CometFilter (92)
         +- CometNativeScan parquet spark_catalog.default.date_dim (91)


(91) CometNativeScan parquet spark_catalog.default.date_dim
Output [3]: [d_date_sk#35, d_year#36, d_moy#37]
Batched: true
Location [not included in comparison]/{warehouse_dir}/date_dim]
PushedFilters: [IsNotNull(d_year), IsNotNull(d_moy), EqualTo(d_year,2000), EqualTo(d_moy,2), IsNotNull(d_date_sk)]
ReadSchema: struct<d_date_sk:int,d_year:int,d_moy:int>

(92) CometFilter
Input [3]: [d_date_sk#35, d_year#36, d_moy#37]
Condition : ((((isnotnull(d_year#36) AND isnotnull(d_moy#37)) AND (d_year#36 = 2000)) AND (d_moy#37 = 2)) AND isnotnull(d_date_sk#35))

(93) CometProject
Input [3]: [d_date_sk#35, d_year#36, d_moy#37]
Arguments: [d_date_sk#35], [d_date_sk#35]

(94) CometColumnarToRow [codegen id : 1]
Input [1]: [d_date_sk#35]

(95) BroadcastExchange
Input [1]: [d_date_sk#35]
Arguments: HashedRelationBroadcastMode(List(cast(input[0, int, true] as bigint)),false), [plan_id=10]

Subquery:2 Hosting operator id = 4 Hosting Expression = ss_sold_date_sk#8 IN dynamicpruning#9
BroadcastExchange (100)
+- * CometColumnarToRow (99)
   +- CometProject (98)
      +- CometFilter (97)
         +- CometNativeScan parquet spark_catalog.default.date_dim (96)


(96) CometNativeScan parquet spark_catalog.default.date_dim
Output [3]: [d_date_sk#10, d_date#11, d_year#60]
Batched: true
Location [not included in comparison]/{warehouse_dir}/date_dim]
PushedFilters: [In(d_year, [2000,2001,2002,2003]), IsNotNull(d_date_sk)]
ReadSchema: struct<d_date_sk:int,d_date:date,d_year:int>

(97) CometFilter
Input [3]: [d_date_sk#10, d_date#11, d_year#60]
Condition : (d_year#60 IN (2000,2001,2002,2003) AND isnotnull(d_date_sk#10))

(98) CometProject
Input [3]: [d_date_sk#10, d_date#11, d_year#60]
Arguments: [d_date_sk#10, d_date#11], [d_date_sk#10, d_date#11]

(99) CometColumnarToRow [codegen id : 1]
Input [2]: [d_date_sk#10, d_date#11]

(100) BroadcastExchange
Input [2]: [d_date_sk#10, d_date#11]
Arguments: HashedRelationBroadcastMode(List(cast(input[0, int, true] as bigint)),false), [plan_id=11]

Subquery:3 Hosting operator id = 38 Hosting Expression = Subquery scalar-subquery#28, [id=#29]
* HashAggregate (120)
+- * CometColumnarToRow (119)
   +- CometColumnarExchange (118)
      +- * HashAggregate (117)
         +- * HashAggregate (116)
            +- * CometColumnarToRow (115)
               +- CometColumnarExchange (114)
                  +- * HashAggregate (113)
                     +- * Project (112)
                        +- * BroadcastHashJoin Inner BuildRight (111)
                           :- * Project (109)
                           :  +- * BroadcastHashJoin Inner BuildRight (108)
                           :     :- * Filter (103)
                           :     :  +- * ColumnarToRow (102)
                           :     :     +- Scan parquet spark_catalog.default.store_sales (101)
                           :     +- BroadcastExchange (107)
                           :        +- * CometColumnarToRow (106)
                           :           +- CometFilter (105)
                           :              +- CometNativeScan parquet spark_catalog.default.customer (104)
                           +- ReusedExchange (110)


(101) Scan parquet spark_catalog.default.store_sales
Output [4]: [ss_customer_sk#61, ss_quantity#62, ss_sales_price#63, ss_sold_date_sk#64]
Batched: true
Location: InMemoryFileIndex []
PartitionFilters: [isnotnull(ss_sold_date_sk#64), dynamicpruningexpression(ss_sold_date_sk#64 IN dynamicpruning#65)]
PushedFilters: [IsNotNull(ss_customer_sk)]
ReadSchema: struct<ss_customer_sk:int,ss_quantity:int,ss_sales_price:decimal(7,2)>

(102) ColumnarToRow [codegen id : 3]
Input [4]: [ss_customer_sk#61, ss_quantity#62, ss_sales_price#63, ss_sold_date_sk#64]

(103) Filter [codegen id : 3]
Input [4]: [ss_customer_sk#61, ss_quantity#62, ss_sales_price#63, ss_sold_date_sk#64]
Condition : isnotnull(ss_customer_sk#61)

(104) CometNativeScan parquet spark_catalog.default.customer
Output [1]: [c_customer_sk#66]
Batched: true
Location [not included in comparison]/{warehouse_dir}/customer]
PushedFilters: [IsNotNull(c_customer_sk)]
ReadSchema: struct<c_customer_sk:int>

(105) CometFilter
Input [1]: [c_customer_sk#66]
Condition : isnotnull(c_customer_sk#66)

(106) CometColumnarToRow [codegen id : 1]
Input [1]: [c_customer_sk#66]

(107) BroadcastExchange
Input [1]: [c_customer_sk#66]
Arguments: HashedRelationBroadcastMode(List(cast(input[0, int, false] as bigint)),false), [plan_id=12]

(108) BroadcastHashJoin [codegen id : 3]
Left keys [1]: [ss_customer_sk#61]
Right keys [1]: [c_customer_sk#66]
Join type: Inner
Join condition: None

(109) Project [codegen id : 3]
Output [4]: [ss_quantity#62, ss_sales_price#63, ss_sold_date_sk#64, c_customer_sk#66]
Input [5]: [ss_customer_sk#61, ss_quantity#62, ss_sales_price#63, ss_sold_date_sk#64, c_customer_sk#66]

(110) ReusedExchange [Reuses operator id: 125]
Output [1]: [d_date_sk#67]

(111) BroadcastHashJoin [codegen id : 3]
Left keys [1]: [ss_sold_date_sk#64]
Right keys [1]: [d_date_sk#67]
Join type: Inner
Join condition: None

(112) Project [codegen id : 3]
Output [3]: [ss_quantity#62, ss_sales_price#63, c_customer_sk#66]
Input [5]: [ss_quantity#62, ss_sales_price#63, ss_sold_date_sk#64, c_customer_sk#66, d_date_sk#67]

(113) HashAggregate [codegen id : 3]
Input [3]: [ss_quantity#62, ss_sales_price#63, c_customer_sk#66]
Keys [1]: [c_customer_sk#66]
Functions [1]: [partial_sum((cast(ss_quantity#62 as decimal(10,0)) * ss_sales_price#63))]
Aggregate Attributes [2]: [sum#68, isEmpty#69]
Results [3]: [c_customer_sk#66, sum#70, isEmpty#71]

(114) CometColumnarExchange
Input [3]: [c_customer_sk#66, sum#70, isEmpty#71]
Arguments: hashpartitioning(c_customer_sk#66, 5), ENSURE_REQUIREMENTS, CometColumnarShuffle, [plan_id=13]

(115) CometColumnarToRow [codegen id : 4]
Input [3]: [c_customer_sk#66, sum#70, isEmpty#71]

(116) HashAggregate [codegen id : 4]
Input [3]: [c_customer_sk#66, sum#70, isEmpty#71]
Keys [1]: [c_customer_sk#66]
Functions [1]: [sum((cast(ss_quantity#62 as decimal(10,0)) * ss_sales_price#63))]
Aggregate Attributes [1]: [sum((cast(ss_quantity#62 as decimal(10,0)) * ss_sales_price#63))#72]
Results [1]: [sum((cast(ss_quantity#62 as decimal(10,0)) * ss_sales_price#63))#72 AS csales#73]

(117) HashAggregate [codegen id : 4]
Input [1]: [csales#73]
Keys: []
Functions [1]: [partial_max(csales#73)]
Aggregate Attributes [1]: [max#74]
Results [1]: [max#75]

(118) CometColumnarExchange
Input [1]: [max#75]
Arguments: SinglePartition, ENSURE_REQUIREMENTS, CometColumnarShuffle, [plan_id=14]

(119) CometColumnarToRow [codegen id : 5]
Input [1]: [max#75]

(120) HashAggregate [codegen id : 5]
Input [1]: [max#75]
Keys: []
Functions [1]: [max(csales#73)]
Aggregate Attributes [1]: [max(csales#73)#76]
Results [1]: [max(csales#73)#76 AS tpcds_cmax#77]

Subquery:4 Hosting operator id = 101 Hosting Expression = ss_sold_date_sk#64 IN dynamicpruning#65
BroadcastExchange (125)
+- * CometColumnarToRow (124)
   +- CometProject (123)
      +- CometFilter (122)
         +- CometNativeScan parquet spark_catalog.default.date_dim (121)


(121) CometNativeScan parquet spark_catalog.default.date_dim
Output [2]: [d_date_sk#67, d_year#78]
Batched: true
Location [not included in comparison]/{warehouse_dir}/date_dim]
PushedFilters: [In(d_year, [2000,2001,2002,2003]), IsNotNull(d_date_sk)]
ReadSchema: struct<d_date_sk:int,d_year:int>

(122) CometFilter
Input [2]: [d_date_sk#67, d_year#78]
Condition : (d_year#78 IN (2000,2001,2002,2003) AND isnotnull(d_date_sk#67))

(123) CometProject
Input [2]: [d_date_sk#67, d_year#78]
Arguments: [d_date_sk#67], [d_date_sk#67]

(124) CometColumnarToRow [codegen id : 1]
Input [1]: [d_date_sk#67]

(125) BroadcastExchange
Input [1]: [d_date_sk#67]
Arguments: HashedRelationBroadcastMode(List(cast(input[0, int, true] as bigint)),false), [plan_id=15]

Subquery:5 Hosting operator id = 48 Hosting Expression = ReusedSubquery Subquery scalar-subquery#28, [id=#29]

Subquery:6 Hosting operator id = 65 Hosting Expression = ws_sold_date_sk#44 IN dynamicpruning#6

Subquery:7 Hosting operator id = 75 Hosting Expression = ReusedSubquery Subquery scalar-subquery#28, [id=#29]


