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


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

(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) CometNativeScan: `spark_catalog`.`default`.`store_sales`
Output [2]: [ss_item_sk#6, ss_sold_date_sk#7]
Arguments: [ss_item_sk#6, ss_sold_date_sk#7]

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

(5) CometNativeScan: `spark_catalog`.`default`.`date_dim`
Output [3]: [d_date_sk#8, d_date#9, d_year#10]
Arguments: [d_date_sk#8, d_date#9, d_year#10]

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

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

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

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

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

(11) CometNativeScan: `spark_catalog`.`default`.`item`
Output [2]: [i_item_sk#11, i_item_desc#12]
Arguments: [i_item_sk#11, i_item_desc#12]

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

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

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

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

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

(17) CometExchange
Input [4]: [_groupingexpression#13, i_item_sk#11, d_date#9, count#14]
Arguments: hashpartitioning(_groupingexpression#13, i_item_sk#11, d_date#9, 5), ENSURE_REQUIREMENTS, CometNativeShuffle, [plan_id=1]

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

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

(20) CometProject
Input [2]: [item_sk#15, cnt#16]
Arguments: [item_sk#15], [item_sk#15]

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

(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#15]
Arguments: [cs_item_sk#2], [item_sk#15], 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) CometExchange
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, CometNativeShuffle, [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) CometNativeScan: `spark_catalog`.`default`.`store_sales`
Output [4]: [ss_customer_sk#17, ss_quantity#18, ss_sales_price#19, ss_sold_date_sk#20]
Arguments: [ss_customer_sk#17, ss_quantity#18, ss_sales_price#19, ss_sold_date_sk#20]

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

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

(29) CometNativeScan: `spark_catalog`.`default`.`customer`
Output [1]: [c_customer_sk#21]
Arguments: [c_customer_sk#21]

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

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

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

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

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

(35) CometExchange
Input [3]: [c_customer_sk#21, sum#22, isEmpty#23]
Arguments: hashpartitioning(c_customer_sk#21, 5), ENSURE_REQUIREMENTS, CometNativeShuffle, [plan_id=3]

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

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

(38) CometProject
Input [2]: [c_customer_sk#21, ssales#24]
Arguments: [c_customer_sk#21], [c_customer_sk#21]

(39) CometSort
Input [1]: [c_customer_sk#21]
Arguments: [c_customer_sk#21], [c_customer_sk#21 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#21]
Arguments: [cs_bill_customer_sk#1], [c_customer_sk#21], LeftSemi

(41) CometNativeScan: `spark_catalog`.`default`.`customer`
Output [3]: [c_customer_sk#27, c_first_name#28, c_last_name#29]
Arguments: [c_customer_sk#27, c_first_name#28, c_last_name#29]

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

(43) CometExchange
Input [3]: [c_customer_sk#27, c_first_name#28, c_last_name#29]
Arguments: hashpartitioning(c_customer_sk#27, 5), ENSURE_REQUIREMENTS, CometNativeShuffle, [plan_id=4]

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

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

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

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

(48) CometProject
Input [2]: [c_customer_sk#21, ssales#24]
Arguments: [c_customer_sk#21], [c_customer_sk#21]

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

(50) CometSortMergeJoin
Left output [3]: [c_customer_sk#27, c_first_name#28, c_last_name#29]
Right output [1]: [c_customer_sk#21]
Arguments: [c_customer_sk#27], [c_customer_sk#21], LeftSemi

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

(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#27, c_first_name#28, c_last_name#29]
Arguments: [cs_bill_customer_sk#1], [c_customer_sk#27], 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#27, c_first_name#28, c_last_name#29]
Arguments: [cs_quantity#3, cs_list_price#4, cs_sold_date_sk#5, c_first_name#28, c_last_name#29], [cs_quantity#3, cs_list_price#4, cs_sold_date_sk#5, c_first_name#28, c_last_name#29]

(54) CometNativeScan: `spark_catalog`.`default`.`date_dim`
Output [3]: [d_date_sk#30, d_year#31, d_moy#32]
Arguments: [d_date_sk#30, d_year#31, d_moy#32]

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

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

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

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

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

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

(61) CometExchange
Input [4]: [c_last_name#29, c_first_name#28, sum#33, isEmpty#34]
Arguments: hashpartitioning(c_last_name#29, c_first_name#28, 5), ENSURE_REQUIREMENTS, CometNativeShuffle, [plan_id=5]

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

(63) CometNativeScan: `spark_catalog`.`default`.`web_sales`
Output [5]: [ws_item_sk#35, ws_bill_customer_sk#36, ws_quantity#37, ws_list_price#38, ws_sold_date_sk#39]
Arguments: [ws_item_sk#35, ws_bill_customer_sk#36, ws_quantity#37, ws_list_price#38, ws_sold_date_sk#39]

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

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

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

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

(68) CometExchange
Input [4]: [ws_bill_customer_sk#36, ws_quantity#37, ws_list_price#38, ws_sold_date_sk#39]
Arguments: hashpartitioning(ws_bill_customer_sk#36, 5), ENSURE_REQUIREMENTS, CometNativeShuffle, [plan_id=6]

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

(70) ReusedExchange [Reuses operator id: 35]
Output [3]: [c_customer_sk#41, sum#42, isEmpty#43]

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

(72) CometFilter
Input [2]: [c_customer_sk#41, ssales#46]
Condition : (isnotnull(ssales#46) AND (cast(ssales#46 as decimal(38,8)) > (0.500000 * ReusedSubquery Subquery scalar-subquery#25, [id=#26])))

(73) CometProject
Input [2]: [c_customer_sk#41, ssales#46]
Arguments: [c_customer_sk#41], [c_customer_sk#41]

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

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

(76) ReusedExchange [Reuses operator id: 51]
Output [3]: [c_customer_sk#47, c_first_name#48, c_last_name#49]

(77) CometBroadcastHashJoin
Left output [4]: [ws_bill_customer_sk#36, ws_quantity#37, ws_list_price#38, ws_sold_date_sk#39]
Right output [3]: [c_customer_sk#47, c_first_name#48, c_last_name#49]
Arguments: [ws_bill_customer_sk#36], [c_customer_sk#47], Inner, BuildRight

(78) CometProject
Input [7]: [ws_bill_customer_sk#36, ws_quantity#37, ws_list_price#38, ws_sold_date_sk#39, c_customer_sk#47, c_first_name#48, c_last_name#49]
Arguments: [ws_quantity#37, ws_list_price#38, ws_sold_date_sk#39, c_first_name#48, c_last_name#49], [ws_quantity#37, ws_list_price#38, ws_sold_date_sk#39, c_first_name#48, c_last_name#49]

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

(80) CometBroadcastHashJoin
Left output [5]: [ws_quantity#37, ws_list_price#38, ws_sold_date_sk#39, c_first_name#48, c_last_name#49]
Right output [1]: [d_date_sk#50]
Arguments: [ws_sold_date_sk#39], [d_date_sk#50], Inner, BuildRight

(81) CometProject
Input [6]: [ws_quantity#37, ws_list_price#38, ws_sold_date_sk#39, c_first_name#48, c_last_name#49, d_date_sk#50]
Arguments: [ws_quantity#37, ws_list_price#38, c_first_name#48, c_last_name#49], [ws_quantity#37, ws_list_price#38, c_first_name#48, c_last_name#49]

(82) CometHashAggregate
Input [4]: [ws_quantity#37, ws_list_price#38, c_first_name#48, c_last_name#49]
Keys [2]: [c_last_name#49, c_first_name#48]
Functions [1]: [partial_sum((cast(ws_quantity#37 as decimal(10,0)) * ws_list_price#38))]

(83) CometExchange
Input [4]: [c_last_name#49, c_first_name#48, sum#51, isEmpty#52]
Arguments: hashpartitioning(c_last_name#49, c_first_name#48, 5), ENSURE_REQUIREMENTS, CometNativeShuffle, [plan_id=7]

(84) CometHashAggregate
Input [4]: [c_last_name#49, c_first_name#48, sum#51, isEmpty#52]
Keys [2]: [c_last_name#49, c_first_name#48]
Functions [1]: [sum((cast(ws_quantity#37 as decimal(10,0)) * ws_list_price#38))]

(85) CometUnion
Child 0 Input [3]: [c_last_name#29, c_first_name#28, sales#53]
Child 1 Input [3]: [c_last_name#49, c_first_name#48, sales#54]

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

(87) ColumnarToRow [codegen id : 1]
Input [3]: [c_last_name#29, c_first_name#28, sales#53]

===== Subqueries =====

Subquery:1 Hosting operator id = 37 Hosting Expression = Subquery scalar-subquery#25, [id=#26]
* ColumnarToRow (105)
+- CometHashAggregate (104)
   +- CometExchange (103)
      +- CometHashAggregate (102)
         +- CometHashAggregate (101)
            +- CometExchange (100)
               +- CometHashAggregate (99)
                  +- CometProject (98)
                     +- CometBroadcastHashJoin (97)
                        :- CometProject (92)
                        :  +- CometBroadcastHashJoin (91)
                        :     :- CometFilter (89)
                        :     :  +- CometNativeScan: `spark_catalog`.`default`.`store_sales` (88)
                        :     +- ReusedExchange (90)
                        +- CometBroadcastExchange (96)
                           +- CometProject (95)
                              +- CometFilter (94)
                                 +- CometNativeScan: `spark_catalog`.`default`.`date_dim` (93)


(88) CometNativeScan: `spark_catalog`.`default`.`store_sales`
Output [4]: [ss_customer_sk#55, ss_quantity#56, ss_sales_price#57, ss_sold_date_sk#58]
Arguments: [ss_customer_sk#55, ss_quantity#56, ss_sales_price#57, ss_sold_date_sk#58]

(89) CometFilter
Input [4]: [ss_customer_sk#55, ss_quantity#56, ss_sales_price#57, ss_sold_date_sk#58]
Condition : isnotnull(ss_customer_sk#55)

(90) ReusedExchange [Reuses operator id: 31]
Output [1]: [c_customer_sk#59]

(91) CometBroadcastHashJoin
Left output [4]: [ss_customer_sk#55, ss_quantity#56, ss_sales_price#57, ss_sold_date_sk#58]
Right output [1]: [c_customer_sk#59]
Arguments: [ss_customer_sk#55], [c_customer_sk#59], Inner, BuildRight

(92) CometProject
Input [5]: [ss_customer_sk#55, ss_quantity#56, ss_sales_price#57, ss_sold_date_sk#58, c_customer_sk#59]
Arguments: [ss_quantity#56, ss_sales_price#57, ss_sold_date_sk#58, c_customer_sk#59], [ss_quantity#56, ss_sales_price#57, ss_sold_date_sk#58, c_customer_sk#59]

(93) CometNativeScan: `spark_catalog`.`default`.`date_dim`
Output [2]: [d_date_sk#60, d_year#61]
Arguments: [d_date_sk#60, d_year#61]

(94) CometFilter
Input [2]: [d_date_sk#60, d_year#61]
Condition : (d_year#61 IN (2000,2001,2002,2003) AND isnotnull(d_date_sk#60))

(95) CometProject
Input [2]: [d_date_sk#60, d_year#61]
Arguments: [d_date_sk#60], [d_date_sk#60]

(96) CometBroadcastExchange
Input [1]: [d_date_sk#60]
Arguments: [d_date_sk#60]

(97) CometBroadcastHashJoin
Left output [4]: [ss_quantity#56, ss_sales_price#57, ss_sold_date_sk#58, c_customer_sk#59]
Right output [1]: [d_date_sk#60]
Arguments: [ss_sold_date_sk#58], [d_date_sk#60], Inner, BuildRight

(98) CometProject
Input [5]: [ss_quantity#56, ss_sales_price#57, ss_sold_date_sk#58, c_customer_sk#59, d_date_sk#60]
Arguments: [ss_quantity#56, ss_sales_price#57, c_customer_sk#59], [ss_quantity#56, ss_sales_price#57, c_customer_sk#59]

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

(100) CometExchange
Input [3]: [c_customer_sk#59, sum#62, isEmpty#63]
Arguments: hashpartitioning(c_customer_sk#59, 5), ENSURE_REQUIREMENTS, CometNativeShuffle, [plan_id=8]

(101) CometHashAggregate
Input [3]: [c_customer_sk#59, sum#62, isEmpty#63]
Keys [1]: [c_customer_sk#59]
Functions [1]: [sum((cast(ss_quantity#56 as decimal(10,0)) * ss_sales_price#57))]

(102) CometHashAggregate
Input [1]: [csales#64]
Keys: []
Functions [1]: [partial_max(csales#64)]

(103) CometExchange
Input [1]: [max#65]
Arguments: SinglePartition, ENSURE_REQUIREMENTS, CometNativeShuffle, [plan_id=9]

(104) CometHashAggregate
Input [1]: [max#65]
Keys: []
Functions [1]: [max(csales#64)]

(105) ColumnarToRow [codegen id : 1]
Input [1]: [tpcds_cmax#66]

Subquery:2 Hosting operator id = 47 Hosting Expression = ReusedSubquery Subquery scalar-subquery#25, [id=#26]

Subquery:3 Hosting operator id = 72 Hosting Expression = ReusedSubquery Subquery scalar-subquery#25, [id=#26]


