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


(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) CometFilter
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)

(3) 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>

(4) CometFilter
Input [2]: [ss_item_sk#7, ss_sold_date_sk#8]
Condition : isnotnull(ss_item_sk#7)

(5) Scan parquet spark_catalog.default.date_dim
Output [3]: [d_date_sk#10, d_date#11, d_year#12]
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>

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

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

(8) CometBroadcastExchange
Input [2]: [d_date_sk#10, d_date#11]
Arguments: [d_date_sk#10, d_date#11]

(9) CometBroadcastHashJoin
Left output [2]: [ss_item_sk#7, ss_sold_date_sk#8]
Right output [2]: [d_date_sk#10, d_date#11]
Arguments: [ss_sold_date_sk#8], [d_date_sk#10], Inner, BuildRight

(10) CometProject
Input [4]: [ss_item_sk#7, ss_sold_date_sk#8, d_date_sk#10, d_date#11]
Arguments: [ss_item_sk#7, d_date#11], [ss_item_sk#7, d_date#11]

(11) Scan parquet spark_catalog.default.item
Output [2]: [i_item_sk#13, i_item_desc#14]
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>

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

(13) CometBroadcastExchange
Input [2]: [i_item_sk#13, i_item_desc#14]
Arguments: [i_item_sk#13, i_item_desc#14]

(14) CometBroadcastHashJoin
Left output [2]: [ss_item_sk#7, d_date#11]
Right output [2]: [i_item_sk#13, i_item_desc#14]
Arguments: [ss_item_sk#7], [i_item_sk#13], Inner, BuildRight

(15) CometProject
Input [4]: [ss_item_sk#7, d_date#11, i_item_sk#13, i_item_desc#14]
Arguments: [d_date#11, i_item_sk#13, _groupingexpression#15], [d_date#11, i_item_sk#13, substr(i_item_desc#14, 1, 30) AS _groupingexpression#15]

(16) CometHashAggregate
Input [3]: [d_date#11, i_item_sk#13, _groupingexpression#15]
Keys [3]: [_groupingexpression#15, i_item_sk#13, d_date#11]
Functions [1]: [partial_count(1)]

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

(18) CometHashAggregate
Input [4]: [_groupingexpression#15, i_item_sk#13, d_date#11, count#16]
Keys [3]: [_groupingexpression#15, i_item_sk#13, d_date#11]
Functions [1]: [count(1)]

(19) CometFilter
Input [2]: [item_sk#17, cnt#18]
Condition : (cnt#18 > 4)

(20) CometProject
Input [2]: [item_sk#17, cnt#18]
Arguments: [item_sk#17], [item_sk#17]

(21) CometBroadcastExchange
Input [1]: [item_sk#17]
Arguments: [item_sk#17]

(22) CometBroadcastHashJoin
Left output [5]: [cs_bill_customer_sk#1, cs_item_sk#2, cs_quantity#3, cs_list_price#4, cs_sold_date_sk#5]
Right output [1]: [item_sk#17]
Arguments: [cs_item_sk#2], [item_sk#17], LeftSemi, BuildRight

(23) CometProject
Input [5]: [cs_bill_customer_sk#1, cs_item_sk#2, 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, cs_quantity#3, cs_list_price#4, cs_sold_date_sk#5]

(24) 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=2]

(25) 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]

(26) Scan parquet spark_catalog.default.store_sales
Output [4]: [ss_customer_sk#19, ss_quantity#20, ss_sales_price#21, ss_sold_date_sk#22]
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)>

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

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

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

(30) CometFilter
Input [1]: [c_customer_sk#23]
Condition : isnotnull(c_customer_sk#23)

(31) CometBroadcastExchange
Input [1]: [c_customer_sk#23]
Arguments: [c_customer_sk#23]

(32) CometBroadcastHashJoin
Left output [3]: [ss_customer_sk#19, ss_quantity#20, ss_sales_price#21]
Right output [1]: [c_customer_sk#23]
Arguments: [ss_customer_sk#19], [c_customer_sk#23], Inner, BuildRight

(33) CometProject
Input [4]: [ss_customer_sk#19, ss_quantity#20, ss_sales_price#21, c_customer_sk#23]
Arguments: [ss_quantity#20, ss_sales_price#21, c_customer_sk#23], [ss_quantity#20, ss_sales_price#21, c_customer_sk#23]

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

(35) CometColumnarExchange
Input [3]: [c_customer_sk#23, sum#24, isEmpty#25]
Arguments: hashpartitioning(c_customer_sk#23, 5), ENSURE_REQUIREMENTS, CometColumnarShuffle, [plan_id=3]

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

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

(38) CometProject
Input [2]: [c_customer_sk#23, ssales#26]
Arguments: [c_customer_sk#23], [c_customer_sk#23]

(39) CometSort
Input [1]: [c_customer_sk#23]
Arguments: [c_customer_sk#23], [c_customer_sk#23 ASC NULLS FIRST]

(40) 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#23]
Arguments: [cs_bill_customer_sk#1], [c_customer_sk#23], LeftSemi

(41) Scan parquet spark_catalog.default.customer
Output [3]: [c_customer_sk#29, c_first_name#30, c_last_name#31]
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>

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

(43) CometColumnarExchange
Input [3]: [c_customer_sk#29, c_first_name#30, c_last_name#31]
Arguments: hashpartitioning(c_customer_sk#29, 5), ENSURE_REQUIREMENTS, CometColumnarShuffle, [plan_id=4]

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

(45) ReusedExchange [Reuses operator id: 35]
Output [3]: [c_customer_sk#23, sum#24, isEmpty#25]

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

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

(48) CometProject
Input [2]: [c_customer_sk#23, ssales#26]
Arguments: [c_customer_sk#23], [c_customer_sk#23]

(49) CometSort
Input [1]: [c_customer_sk#23]
Arguments: [c_customer_sk#23], [c_customer_sk#23 ASC NULLS FIRST]

(50) CometSortMergeJoin
Left output [3]: [c_customer_sk#29, c_first_name#30, c_last_name#31]
Right output [1]: [c_customer_sk#23]
Arguments: [c_customer_sk#29], [c_customer_sk#23], LeftSemi

(51) CometBroadcastExchange
Input [3]: [c_customer_sk#29, c_first_name#30, c_last_name#31]
Arguments: [c_customer_sk#29, c_first_name#30, c_last_name#31]

(52) 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#29, c_first_name#30, c_last_name#31]
Arguments: [cs_bill_customer_sk#1], [c_customer_sk#29], Inner, BuildRight

(53) CometProject
Input [7]: [cs_bill_customer_sk#1, cs_quantity#3, cs_list_price#4, cs_sold_date_sk#5, c_customer_sk#29, c_first_name#30, c_last_name#31]
Arguments: [cs_quantity#3, cs_list_price#4, cs_sold_date_sk#5, c_first_name#30, c_last_name#31], [cs_quantity#3, cs_list_price#4, cs_sold_date_sk#5, c_first_name#30, c_last_name#31]

(54) Scan parquet spark_catalog.default.date_dim
Output [3]: [d_date_sk#32, d_year#33, d_moy#34]
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>

(55) CometFilter
Input [3]: [d_date_sk#32, d_year#33, d_moy#34]
Condition : ((((isnotnull(d_year#33) AND isnotnull(d_moy#34)) AND (d_year#33 = 2000)) AND (d_moy#34 = 2)) AND isnotnull(d_date_sk#32))

(56) CometProject
Input [3]: [d_date_sk#32, d_year#33, d_moy#34]
Arguments: [d_date_sk#32], [d_date_sk#32]

(57) CometBroadcastExchange
Input [1]: [d_date_sk#32]
Arguments: [d_date_sk#32]

(58) CometBroadcastHashJoin
Left output [5]: [cs_quantity#3, cs_list_price#4, cs_sold_date_sk#5, c_first_name#30, c_last_name#31]
Right output [1]: [d_date_sk#32]
Arguments: [cs_sold_date_sk#5], [d_date_sk#32], Inner, BuildRight

(59) CometProject
Input [6]: [cs_quantity#3, cs_list_price#4, cs_sold_date_sk#5, c_first_name#30, c_last_name#31, d_date_sk#32]
Arguments: [cs_quantity#3, cs_list_price#4, c_first_name#30, c_last_name#31], [cs_quantity#3, cs_list_price#4, c_first_name#30, c_last_name#31]

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

(61) CometColumnarExchange
Input [4]: [c_last_name#31, c_first_name#30, sum#35, isEmpty#36]
Arguments: hashpartitioning(c_last_name#31, c_first_name#30, 5), ENSURE_REQUIREMENTS, CometColumnarShuffle, [plan_id=5]

(62) CometHashAggregate
Input [4]: [c_last_name#31, c_first_name#30, sum#35, isEmpty#36]
Keys [2]: [c_last_name#31, c_first_name#30]
Functions [1]: [sum((cast(cs_quantity#3 as decimal(10,0)) * cs_list_price#4))]

(63) Scan parquet spark_catalog.default.web_sales
Output [5]: [ws_item_sk#37, ws_bill_customer_sk#38, ws_quantity#39, ws_list_price#40, ws_sold_date_sk#41]
Batched: true
Location: InMemoryFileIndex []
PartitionFilters: [isnotnull(ws_sold_date_sk#41), dynamicpruningexpression(ws_sold_date_sk#41 IN dynamicpruning#42)]
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)>

(64) CometFilter
Input [5]: [ws_item_sk#37, ws_bill_customer_sk#38, ws_quantity#39, ws_list_price#40, ws_sold_date_sk#41]
Condition : isnotnull(ws_bill_customer_sk#38)

(65) ReusedExchange [Reuses operator id: 21]
Output [1]: [item_sk#43]

(66) CometBroadcastHashJoin
Left output [5]: [ws_item_sk#37, ws_bill_customer_sk#38, ws_quantity#39, ws_list_price#40, ws_sold_date_sk#41]
Right output [1]: [item_sk#43]
Arguments: [ws_item_sk#37], [item_sk#43], LeftSemi, BuildRight

(67) CometProject
Input [5]: [ws_item_sk#37, ws_bill_customer_sk#38, ws_quantity#39, ws_list_price#40, ws_sold_date_sk#41]
Arguments: [ws_bill_customer_sk#38, ws_quantity#39, ws_list_price#40, ws_sold_date_sk#41], [ws_bill_customer_sk#38, ws_quantity#39, ws_list_price#40, ws_sold_date_sk#41]

(68) CometColumnarExchange
Input [4]: [ws_bill_customer_sk#38, ws_quantity#39, ws_list_price#40, ws_sold_date_sk#41]
Arguments: hashpartitioning(ws_bill_customer_sk#38, 5), ENSURE_REQUIREMENTS, CometColumnarShuffle, [plan_id=6]

(69) CometSort
Input [4]: [ws_bill_customer_sk#38, ws_quantity#39, ws_list_price#40, ws_sold_date_sk#41]
Arguments: [ws_bill_customer_sk#38, ws_quantity#39, ws_list_price#40, ws_sold_date_sk#41], [ws_bill_customer_sk#38 ASC NULLS FIRST]

(70) ReusedExchange [Reuses operator id: 35]
Output [3]: [c_customer_sk#44, sum#45, isEmpty#46]

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

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

(73) CometProject
Input [2]: [c_customer_sk#44, ssales#49]
Arguments: [c_customer_sk#44], [c_customer_sk#44]

(74) CometSort
Input [1]: [c_customer_sk#44]
Arguments: [c_customer_sk#44], [c_customer_sk#44 ASC NULLS FIRST]

(75) CometSortMergeJoin
Left output [4]: [ws_bill_customer_sk#38, ws_quantity#39, ws_list_price#40, ws_sold_date_sk#41]
Right output [1]: [c_customer_sk#44]
Arguments: [ws_bill_customer_sk#38], [c_customer_sk#44], LeftSemi

(76) ReusedExchange [Reuses operator id: 51]
Output [3]: [c_customer_sk#50, c_first_name#51, c_last_name#52]

(77) CometBroadcastHashJoin
Left output [4]: [ws_bill_customer_sk#38, ws_quantity#39, ws_list_price#40, ws_sold_date_sk#41]
Right output [3]: [c_customer_sk#50, c_first_name#51, c_last_name#52]
Arguments: [ws_bill_customer_sk#38], [c_customer_sk#50], Inner, BuildRight

(78) CometProject
Input [7]: [ws_bill_customer_sk#38, ws_quantity#39, ws_list_price#40, ws_sold_date_sk#41, c_customer_sk#50, c_first_name#51, c_last_name#52]
Arguments: [ws_quantity#39, ws_list_price#40, ws_sold_date_sk#41, c_first_name#51, c_last_name#52], [ws_quantity#39, ws_list_price#40, ws_sold_date_sk#41, c_first_name#51, c_last_name#52]

(79) ReusedExchange [Reuses operator id: 57]
Output [1]: [d_date_sk#53]

(80) CometBroadcastHashJoin
Left output [5]: [ws_quantity#39, ws_list_price#40, ws_sold_date_sk#41, c_first_name#51, c_last_name#52]
Right output [1]: [d_date_sk#53]
Arguments: [ws_sold_date_sk#41], [d_date_sk#53], Inner, BuildRight

(81) CometProject
Input [6]: [ws_quantity#39, ws_list_price#40, ws_sold_date_sk#41, c_first_name#51, c_last_name#52, d_date_sk#53]
Arguments: [ws_quantity#39, ws_list_price#40, c_first_name#51, c_last_name#52], [ws_quantity#39, ws_list_price#40, c_first_name#51, c_last_name#52]

(82) CometHashAggregate
Input [4]: [ws_quantity#39, ws_list_price#40, c_first_name#51, c_last_name#52]
Keys [2]: [c_last_name#52, c_first_name#51]
Functions [1]: [partial_sum((cast(ws_quantity#39 as decimal(10,0)) * ws_list_price#40))]

(83) CometColumnarExchange
Input [4]: [c_last_name#52, c_first_name#51, sum#54, isEmpty#55]
Arguments: hashpartitioning(c_last_name#52, c_first_name#51, 5), ENSURE_REQUIREMENTS, CometColumnarShuffle, [plan_id=7]

(84) CometHashAggregate
Input [4]: [c_last_name#52, c_first_name#51, sum#54, isEmpty#55]
Keys [2]: [c_last_name#52, c_first_name#51]
Functions [1]: [sum((cast(ws_quantity#39 as decimal(10,0)) * ws_list_price#40))]

(85) CometUnion
Child 0 Input [3]: [c_last_name#31, c_first_name#30, sales#56]
Child 1 Input [3]: [c_last_name#52, c_first_name#51, sales#57]

(86) CometTakeOrderedAndProject
Input [3]: [c_last_name#31, c_first_name#30, sales#56]
Arguments: TakeOrderedAndProject(limit=100, orderBy=[c_last_name#31 ASC NULLS FIRST,c_first_name#30 ASC NULLS FIRST,sales#56 ASC NULLS FIRST], output=[c_last_name#31,c_first_name#30,sales#56]), [c_last_name#31, c_first_name#30, sales#56], 100, [c_last_name#31 ASC NULLS FIRST, c_first_name#30 ASC NULLS FIRST, sales#56 ASC NULLS FIRST], [c_last_name#31, c_first_name#30, sales#56]

(87) ColumnarToRow [codegen id : 1]
Input [3]: [c_last_name#31, c_first_name#30, sales#56]

===== Subqueries =====

Subquery:1 Hosting operator id = 1 Hosting Expression = cs_sold_date_sk#5 IN dynamicpruning#6
BroadcastExchange (92)
+- * ColumnarToRow (91)
   +- CometProject (90)
      +- CometFilter (89)
         +- CometScan parquet spark_catalog.default.date_dim (88)


(88) Scan parquet spark_catalog.default.date_dim
Output [3]: [d_date_sk#32, d_year#33, d_moy#34]
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>

(89) CometFilter
Input [3]: [d_date_sk#32, d_year#33, d_moy#34]
Condition : ((((isnotnull(d_year#33) AND isnotnull(d_moy#34)) AND (d_year#33 = 2000)) AND (d_moy#34 = 2)) AND isnotnull(d_date_sk#32))

(90) CometProject
Input [3]: [d_date_sk#32, d_year#33, d_moy#34]
Arguments: [d_date_sk#32], [d_date_sk#32]

(91) ColumnarToRow [codegen id : 1]
Input [1]: [d_date_sk#32]

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

Subquery:2 Hosting operator id = 3 Hosting Expression = ss_sold_date_sk#8 IN dynamicpruning#9
BroadcastExchange (97)
+- * ColumnarToRow (96)
   +- CometProject (95)
      +- CometFilter (94)
         +- CometScan parquet spark_catalog.default.date_dim (93)


(93) Scan parquet spark_catalog.default.date_dim
Output [3]: [d_date_sk#10, d_date#11, d_year#12]
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>

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

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

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

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

Subquery:3 Hosting operator id = 37 Hosting Expression = Subquery scalar-subquery#27, [id=#28]
* ColumnarToRow (115)
+- CometHashAggregate (114)
   +- CometColumnarExchange (113)
      +- CometHashAggregate (112)
         +- CometHashAggregate (111)
            +- CometColumnarExchange (110)
               +- CometHashAggregate (109)
                  +- CometProject (108)
                     +- CometBroadcastHashJoin (107)
                        :- CometProject (102)
                        :  +- CometBroadcastHashJoin (101)
                        :     :- CometFilter (99)
                        :     :  +- CometScan parquet spark_catalog.default.store_sales (98)
                        :     +- ReusedExchange (100)
                        +- CometBroadcastExchange (106)
                           +- CometProject (105)
                              +- CometFilter (104)
                                 +- CometScan parquet spark_catalog.default.date_dim (103)


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

(99) CometFilter
Input [4]: [ss_customer_sk#58, ss_quantity#59, ss_sales_price#60, ss_sold_date_sk#61]
Condition : isnotnull(ss_customer_sk#58)

(100) ReusedExchange [Reuses operator id: 31]
Output [1]: [c_customer_sk#63]

(101) CometBroadcastHashJoin
Left output [4]: [ss_customer_sk#58, ss_quantity#59, ss_sales_price#60, ss_sold_date_sk#61]
Right output [1]: [c_customer_sk#63]
Arguments: [ss_customer_sk#58], [c_customer_sk#63], Inner, BuildRight

(102) CometProject
Input [5]: [ss_customer_sk#58, ss_quantity#59, ss_sales_price#60, ss_sold_date_sk#61, c_customer_sk#63]
Arguments: [ss_quantity#59, ss_sales_price#60, ss_sold_date_sk#61, c_customer_sk#63], [ss_quantity#59, ss_sales_price#60, ss_sold_date_sk#61, c_customer_sk#63]

(103) Scan parquet spark_catalog.default.date_dim
Output [2]: [d_date_sk#64, d_year#65]
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>

(104) CometFilter
Input [2]: [d_date_sk#64, d_year#65]
Condition : (d_year#65 IN (2000,2001,2002,2003) AND isnotnull(d_date_sk#64))

(105) CometProject
Input [2]: [d_date_sk#64, d_year#65]
Arguments: [d_date_sk#64], [d_date_sk#64]

(106) CometBroadcastExchange
Input [1]: [d_date_sk#64]
Arguments: [d_date_sk#64]

(107) CometBroadcastHashJoin
Left output [4]: [ss_quantity#59, ss_sales_price#60, ss_sold_date_sk#61, c_customer_sk#63]
Right output [1]: [d_date_sk#64]
Arguments: [ss_sold_date_sk#61], [d_date_sk#64], Inner, BuildRight

(108) CometProject
Input [5]: [ss_quantity#59, ss_sales_price#60, ss_sold_date_sk#61, c_customer_sk#63, d_date_sk#64]
Arguments: [ss_quantity#59, ss_sales_price#60, c_customer_sk#63], [ss_quantity#59, ss_sales_price#60, c_customer_sk#63]

(109) CometHashAggregate
Input [3]: [ss_quantity#59, ss_sales_price#60, c_customer_sk#63]
Keys [1]: [c_customer_sk#63]
Functions [1]: [partial_sum((cast(ss_quantity#59 as decimal(10,0)) * ss_sales_price#60))]

(110) CometColumnarExchange
Input [3]: [c_customer_sk#63, sum#66, isEmpty#67]
Arguments: hashpartitioning(c_customer_sk#63, 5), ENSURE_REQUIREMENTS, CometColumnarShuffle, [plan_id=10]

(111) CometHashAggregate
Input [3]: [c_customer_sk#63, sum#66, isEmpty#67]
Keys [1]: [c_customer_sk#63]
Functions [1]: [sum((cast(ss_quantity#59 as decimal(10,0)) * ss_sales_price#60))]

(112) CometHashAggregate
Input [1]: [csales#68]
Keys: []
Functions [1]: [partial_max(csales#68)]

(113) CometColumnarExchange
Input [1]: [max#69]
Arguments: SinglePartition, ENSURE_REQUIREMENTS, CometColumnarShuffle, [plan_id=11]

(114) CometHashAggregate
Input [1]: [max#69]
Keys: []
Functions [1]: [max(csales#68)]

(115) ColumnarToRow [codegen id : 1]
Input [1]: [tpcds_cmax#70]

Subquery:4 Hosting operator id = 98 Hosting Expression = ss_sold_date_sk#61 IN dynamicpruning#62
BroadcastExchange (120)
+- * ColumnarToRow (119)
   +- CometProject (118)
      +- CometFilter (117)
         +- CometScan parquet spark_catalog.default.date_dim (116)


(116) Scan parquet spark_catalog.default.date_dim
Output [2]: [d_date_sk#64, d_year#65]
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>

(117) CometFilter
Input [2]: [d_date_sk#64, d_year#65]
Condition : (d_year#65 IN (2000,2001,2002,2003) AND isnotnull(d_date_sk#64))

(118) CometProject
Input [2]: [d_date_sk#64, d_year#65]
Arguments: [d_date_sk#64], [d_date_sk#64]

(119) ColumnarToRow [codegen id : 1]
Input [1]: [d_date_sk#64]

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

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

Subquery:6 Hosting operator id = 63 Hosting Expression = ws_sold_date_sk#41 IN dynamicpruning#6

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


