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


(1) Scan parquet spark_catalog.default.store_sales
Output [5]: [ss_item_sk#1, ss_store_sk#2, ss_quantity#3, ss_sales_price#4, ss_sold_date_sk#5]
Batched: true
Location: InMemoryFileIndex []
PartitionFilters: [isnotnull(ss_sold_date_sk#5), dynamicpruningexpression(ss_sold_date_sk#5 IN dynamicpruning#6)]
PushedFilters: [IsNotNull(ss_store_sk), IsNotNull(ss_item_sk)]
ReadSchema: struct<ss_item_sk:int,ss_store_sk:int,ss_quantity:int,ss_sales_price:decimal(7,2)>

(2) CometFilter
Input [5]: [ss_item_sk#1, ss_store_sk#2, ss_quantity#3, ss_sales_price#4, ss_sold_date_sk#5]
Condition : (isnotnull(ss_store_sk#2) AND isnotnull(ss_item_sk#1))

(3) Scan parquet spark_catalog.default.date_dim
Output [5]: [d_date_sk#7, d_month_seq#8, d_year#9, d_moy#10, d_qoy#11]
Batched: true
Location [not included in comparison]/{warehouse_dir}/date_dim]
PushedFilters: [IsNotNull(d_month_seq), GreaterThanOrEqual(d_month_seq,1212), LessThanOrEqual(d_month_seq,1223), IsNotNull(d_date_sk)]
ReadSchema: struct<d_date_sk:int,d_month_seq:int,d_year:int,d_moy:int,d_qoy:int>

(4) CometFilter
Input [5]: [d_date_sk#7, d_month_seq#8, d_year#9, d_moy#10, d_qoy#11]
Condition : (((isnotnull(d_month_seq#8) AND (d_month_seq#8 >= 1212)) AND (d_month_seq#8 <= 1223)) AND isnotnull(d_date_sk#7))

(5) CometProject
Input [5]: [d_date_sk#7, d_month_seq#8, d_year#9, d_moy#10, d_qoy#11]
Arguments: [d_date_sk#7, d_year#9, d_moy#10, d_qoy#11], [d_date_sk#7, d_year#9, d_moy#10, d_qoy#11]

(6) CometBroadcastExchange
Input [4]: [d_date_sk#7, d_year#9, d_moy#10, d_qoy#11]
Arguments: [d_date_sk#7, d_year#9, d_moy#10, d_qoy#11]

(7) CometBroadcastHashJoin
Left output [5]: [ss_item_sk#1, ss_store_sk#2, ss_quantity#3, ss_sales_price#4, ss_sold_date_sk#5]
Right output [4]: [d_date_sk#7, d_year#9, d_moy#10, d_qoy#11]
Arguments: [ss_sold_date_sk#5], [d_date_sk#7], Inner, BuildRight

(8) CometProject
Input [9]: [ss_item_sk#1, ss_store_sk#2, ss_quantity#3, ss_sales_price#4, ss_sold_date_sk#5, d_date_sk#7, d_year#9, d_moy#10, d_qoy#11]
Arguments: [ss_item_sk#1, ss_store_sk#2, ss_quantity#3, ss_sales_price#4, d_year#9, d_moy#10, d_qoy#11], [ss_item_sk#1, ss_store_sk#2, ss_quantity#3, ss_sales_price#4, d_year#9, d_moy#10, d_qoy#11]

(9) Scan parquet spark_catalog.default.store
Output [2]: [s_store_sk#12, s_store_id#13]
Batched: true
Location [not included in comparison]/{warehouse_dir}/store]
PushedFilters: [IsNotNull(s_store_sk)]
ReadSchema: struct<s_store_sk:int,s_store_id:string>

(10) CometFilter
Input [2]: [s_store_sk#12, s_store_id#13]
Condition : isnotnull(s_store_sk#12)

(11) CometBroadcastExchange
Input [2]: [s_store_sk#12, s_store_id#13]
Arguments: [s_store_sk#12, s_store_id#13]

(12) CometBroadcastHashJoin
Left output [7]: [ss_item_sk#1, ss_store_sk#2, ss_quantity#3, ss_sales_price#4, d_year#9, d_moy#10, d_qoy#11]
Right output [2]: [s_store_sk#12, s_store_id#13]
Arguments: [ss_store_sk#2], [s_store_sk#12], Inner, BuildRight

(13) CometProject
Input [9]: [ss_item_sk#1, ss_store_sk#2, ss_quantity#3, ss_sales_price#4, d_year#9, d_moy#10, d_qoy#11, s_store_sk#12, s_store_id#13]
Arguments: [ss_item_sk#1, ss_quantity#3, ss_sales_price#4, d_year#9, d_moy#10, d_qoy#11, s_store_id#13], [ss_item_sk#1, ss_quantity#3, ss_sales_price#4, d_year#9, d_moy#10, d_qoy#11, s_store_id#13]

(14) Scan parquet spark_catalog.default.item
Output [5]: [i_item_sk#14, i_brand#15, i_class#16, i_category#17, i_product_name#18]
Batched: true
Location [not included in comparison]/{warehouse_dir}/item]
PushedFilters: [IsNotNull(i_item_sk)]
ReadSchema: struct<i_item_sk:int,i_brand:string,i_class:string,i_category:string,i_product_name:string>

(15) CometFilter
Input [5]: [i_item_sk#14, i_brand#15, i_class#16, i_category#17, i_product_name#18]
Condition : isnotnull(i_item_sk#14)

(16) CometBroadcastExchange
Input [5]: [i_item_sk#14, i_brand#15, i_class#16, i_category#17, i_product_name#18]
Arguments: [i_item_sk#14, i_brand#15, i_class#16, i_category#17, i_product_name#18]

(17) CometBroadcastHashJoin
Left output [7]: [ss_item_sk#1, ss_quantity#3, ss_sales_price#4, d_year#9, d_moy#10, d_qoy#11, s_store_id#13]
Right output [5]: [i_item_sk#14, i_brand#15, i_class#16, i_category#17, i_product_name#18]
Arguments: [ss_item_sk#1], [i_item_sk#14], Inner, BuildRight

(18) CometProject
Input [12]: [ss_item_sk#1, ss_quantity#3, ss_sales_price#4, d_year#9, d_moy#10, d_qoy#11, s_store_id#13, i_item_sk#14, i_brand#15, i_class#16, i_category#17, i_product_name#18]
Arguments: [ss_quantity#3, ss_sales_price#4, d_year#9, d_moy#10, d_qoy#11, s_store_id#13, i_brand#15, i_class#16, i_category#17, i_product_name#18], [ss_quantity#3, ss_sales_price#4, d_year#9, d_moy#10, d_qoy#11, s_store_id#13, i_brand#15, i_class#16, i_category#17, i_product_name#18]

(19) ColumnarToRow [codegen id : 1]
Input [10]: [ss_quantity#3, ss_sales_price#4, d_year#9, d_moy#10, d_qoy#11, s_store_id#13, i_brand#15, i_class#16, i_category#17, i_product_name#18]

(20) HashAggregate [codegen id : 1]
Input [10]: [ss_quantity#3, ss_sales_price#4, d_year#9, d_moy#10, d_qoy#11, s_store_id#13, i_brand#15, i_class#16, i_category#17, i_product_name#18]
Keys [8]: [i_category#17, i_class#16, i_brand#15, i_product_name#18, d_year#9, d_qoy#11, d_moy#10, s_store_id#13]
Functions [1]: [partial_sum(coalesce((ss_sales_price#4 * cast(ss_quantity#3 as decimal(10,0))), 0.00))]
Aggregate Attributes [2]: [sum#19, isEmpty#20]
Results [10]: [i_category#17, i_class#16, i_brand#15, i_product_name#18, d_year#9, d_qoy#11, d_moy#10, s_store_id#13, sum#21, isEmpty#22]

(21) RowToColumnar
Input [10]: [i_category#17, i_class#16, i_brand#15, i_product_name#18, d_year#9, d_qoy#11, d_moy#10, s_store_id#13, sum#21, isEmpty#22]

(22) CometColumnarExchange
Input [10]: [i_category#17, i_class#16, i_brand#15, i_product_name#18, d_year#9, d_qoy#11, d_moy#10, s_store_id#13, sum#21, isEmpty#22]
Arguments: hashpartitioning(i_category#17, i_class#16, i_brand#15, i_product_name#18, d_year#9, d_qoy#11, d_moy#10, s_store_id#13, 5), ENSURE_REQUIREMENTS, CometColumnarShuffle, [plan_id=1]

(23) ColumnarToRow [codegen id : 2]
Input [10]: [i_category#17, i_class#16, i_brand#15, i_product_name#18, d_year#9, d_qoy#11, d_moy#10, s_store_id#13, sum#21, isEmpty#22]

(24) HashAggregate [codegen id : 2]
Input [10]: [i_category#17, i_class#16, i_brand#15, i_product_name#18, d_year#9, d_qoy#11, d_moy#10, s_store_id#13, sum#21, isEmpty#22]
Keys [8]: [i_category#17, i_class#16, i_brand#15, i_product_name#18, d_year#9, d_qoy#11, d_moy#10, s_store_id#13]
Functions [1]: [sum(coalesce((ss_sales_price#4 * cast(ss_quantity#3 as decimal(10,0))), 0.00))]
Aggregate Attributes [1]: [sum(coalesce((ss_sales_price#4 * cast(ss_quantity#3 as decimal(10,0))), 0.00))#23]
Results [9]: [i_category#17 AS i_category#24, i_class#16 AS i_class#25, i_brand#15 AS i_brand#26, i_product_name#18 AS i_product_name#27, d_year#9 AS d_year#28, d_qoy#11 AS d_qoy#29, d_moy#10 AS d_moy#30, s_store_id#13 AS s_store_id#31, cast(sum(coalesce((ss_sales_price#4 * cast(ss_quantity#3 as decimal(10,0))), 0.00))#23 as decimal(38,2)) AS sumsales#32]

(25) ReusedExchange [Reuses operator id: 22]
Output [10]: [i_category#33, i_class#34, i_brand#35, i_product_name#36, d_year#37, d_qoy#38, d_moy#39, s_store_id#40, sum#41, isEmpty#42]

(26) ColumnarToRow [codegen id : 4]
Input [10]: [i_category#33, i_class#34, i_brand#35, i_product_name#36, d_year#37, d_qoy#38, d_moy#39, s_store_id#40, sum#41, isEmpty#42]

(27) HashAggregate [codegen id : 4]
Input [10]: [i_category#33, i_class#34, i_brand#35, i_product_name#36, d_year#37, d_qoy#38, d_moy#39, s_store_id#40, sum#41, isEmpty#42]
Keys [8]: [i_category#33, i_class#34, i_brand#35, i_product_name#36, d_year#37, d_qoy#38, d_moy#39, s_store_id#40]
Functions [1]: [sum(coalesce((ss_sales_price#43 * cast(ss_quantity#44 as decimal(10,0))), 0.00))]
Aggregate Attributes [1]: [sum(coalesce((ss_sales_price#43 * cast(ss_quantity#44 as decimal(10,0))), 0.00))#23]
Results [8]: [i_category#33, i_class#34, i_brand#35, i_product_name#36, d_year#37, d_qoy#38, d_moy#39, sum(coalesce((ss_sales_price#43 * cast(ss_quantity#44 as decimal(10,0))), 0.00))#23 AS sumsales#45]

(28) HashAggregate [codegen id : 4]
Input [8]: [i_category#33, i_class#34, i_brand#35, i_product_name#36, d_year#37, d_qoy#38, d_moy#39, sumsales#45]
Keys [7]: [i_category#33, i_class#34, i_brand#35, i_product_name#36, d_year#37, d_qoy#38, d_moy#39]
Functions [1]: [partial_sum(sumsales#45)]
Aggregate Attributes [2]: [sum#46, isEmpty#47]
Results [9]: [i_category#33, i_class#34, i_brand#35, i_product_name#36, d_year#37, d_qoy#38, d_moy#39, sum#48, isEmpty#49]

(29) RowToColumnar
Input [9]: [i_category#33, i_class#34, i_brand#35, i_product_name#36, d_year#37, d_qoy#38, d_moy#39, sum#48, isEmpty#49]

(30) CometColumnarExchange
Input [9]: [i_category#33, i_class#34, i_brand#35, i_product_name#36, d_year#37, d_qoy#38, d_moy#39, sum#48, isEmpty#49]
Arguments: hashpartitioning(i_category#33, i_class#34, i_brand#35, i_product_name#36, d_year#37, d_qoy#38, d_moy#39, 5), ENSURE_REQUIREMENTS, CometColumnarShuffle, [plan_id=2]

(31) ColumnarToRow [codegen id : 5]
Input [9]: [i_category#33, i_class#34, i_brand#35, i_product_name#36, d_year#37, d_qoy#38, d_moy#39, sum#48, isEmpty#49]

(32) HashAggregate [codegen id : 5]
Input [9]: [i_category#33, i_class#34, i_brand#35, i_product_name#36, d_year#37, d_qoy#38, d_moy#39, sum#48, isEmpty#49]
Keys [7]: [i_category#33, i_class#34, i_brand#35, i_product_name#36, d_year#37, d_qoy#38, d_moy#39]
Functions [1]: [sum(sumsales#45)]
Aggregate Attributes [1]: [sum(sumsales#45)#50]
Results [9]: [i_category#33, i_class#34, i_brand#35, i_product_name#36, d_year#37, d_qoy#38, d_moy#39, null AS s_store_id#51, sum(sumsales#45)#50 AS sumsales#52]

(33) ReusedExchange [Reuses operator id: 22]
Output [10]: [i_category#53, i_class#54, i_brand#55, i_product_name#56, d_year#57, d_qoy#58, d_moy#59, s_store_id#60, sum#61, isEmpty#62]

(34) ColumnarToRow [codegen id : 7]
Input [10]: [i_category#53, i_class#54, i_brand#55, i_product_name#56, d_year#57, d_qoy#58, d_moy#59, s_store_id#60, sum#61, isEmpty#62]

(35) HashAggregate [codegen id : 7]
Input [10]: [i_category#53, i_class#54, i_brand#55, i_product_name#56, d_year#57, d_qoy#58, d_moy#59, s_store_id#60, sum#61, isEmpty#62]
Keys [8]: [i_category#53, i_class#54, i_brand#55, i_product_name#56, d_year#57, d_qoy#58, d_moy#59, s_store_id#60]
Functions [1]: [sum(coalesce((ss_sales_price#63 * cast(ss_quantity#64 as decimal(10,0))), 0.00))]
Aggregate Attributes [1]: [sum(coalesce((ss_sales_price#63 * cast(ss_quantity#64 as decimal(10,0))), 0.00))#23]
Results [7]: [i_category#53, i_class#54, i_brand#55, i_product_name#56, d_year#57, d_qoy#58, sum(coalesce((ss_sales_price#63 * cast(ss_quantity#64 as decimal(10,0))), 0.00))#23 AS sumsales#65]

(36) HashAggregate [codegen id : 7]
Input [7]: [i_category#53, i_class#54, i_brand#55, i_product_name#56, d_year#57, d_qoy#58, sumsales#65]
Keys [6]: [i_category#53, i_class#54, i_brand#55, i_product_name#56, d_year#57, d_qoy#58]
Functions [1]: [partial_sum(sumsales#65)]
Aggregate Attributes [2]: [sum#66, isEmpty#67]
Results [8]: [i_category#53, i_class#54, i_brand#55, i_product_name#56, d_year#57, d_qoy#58, sum#68, isEmpty#69]

(37) RowToColumnar
Input [8]: [i_category#53, i_class#54, i_brand#55, i_product_name#56, d_year#57, d_qoy#58, sum#68, isEmpty#69]

(38) CometColumnarExchange
Input [8]: [i_category#53, i_class#54, i_brand#55, i_product_name#56, d_year#57, d_qoy#58, sum#68, isEmpty#69]
Arguments: hashpartitioning(i_category#53, i_class#54, i_brand#55, i_product_name#56, d_year#57, d_qoy#58, 5), ENSURE_REQUIREMENTS, CometColumnarShuffle, [plan_id=3]

(39) ColumnarToRow [codegen id : 8]
Input [8]: [i_category#53, i_class#54, i_brand#55, i_product_name#56, d_year#57, d_qoy#58, sum#68, isEmpty#69]

(40) HashAggregate [codegen id : 8]
Input [8]: [i_category#53, i_class#54, i_brand#55, i_product_name#56, d_year#57, d_qoy#58, sum#68, isEmpty#69]
Keys [6]: [i_category#53, i_class#54, i_brand#55, i_product_name#56, d_year#57, d_qoy#58]
Functions [1]: [sum(sumsales#65)]
Aggregate Attributes [1]: [sum(sumsales#65)#70]
Results [9]: [i_category#53, i_class#54, i_brand#55, i_product_name#56, d_year#57, d_qoy#58, null AS d_moy#71, null AS s_store_id#72, sum(sumsales#65)#70 AS sumsales#73]

(41) ReusedExchange [Reuses operator id: 22]
Output [10]: [i_category#74, i_class#75, i_brand#76, i_product_name#77, d_year#78, d_qoy#79, d_moy#80, s_store_id#81, sum#82, isEmpty#83]

(42) ColumnarToRow [codegen id : 10]
Input [10]: [i_category#74, i_class#75, i_brand#76, i_product_name#77, d_year#78, d_qoy#79, d_moy#80, s_store_id#81, sum#82, isEmpty#83]

(43) HashAggregate [codegen id : 10]
Input [10]: [i_category#74, i_class#75, i_brand#76, i_product_name#77, d_year#78, d_qoy#79, d_moy#80, s_store_id#81, sum#82, isEmpty#83]
Keys [8]: [i_category#74, i_class#75, i_brand#76, i_product_name#77, d_year#78, d_qoy#79, d_moy#80, s_store_id#81]
Functions [1]: [sum(coalesce((ss_sales_price#84 * cast(ss_quantity#85 as decimal(10,0))), 0.00))]
Aggregate Attributes [1]: [sum(coalesce((ss_sales_price#84 * cast(ss_quantity#85 as decimal(10,0))), 0.00))#23]
Results [6]: [i_category#74, i_class#75, i_brand#76, i_product_name#77, d_year#78, sum(coalesce((ss_sales_price#84 * cast(ss_quantity#85 as decimal(10,0))), 0.00))#23 AS sumsales#86]

(44) HashAggregate [codegen id : 10]
Input [6]: [i_category#74, i_class#75, i_brand#76, i_product_name#77, d_year#78, sumsales#86]
Keys [5]: [i_category#74, i_class#75, i_brand#76, i_product_name#77, d_year#78]
Functions [1]: [partial_sum(sumsales#86)]
Aggregate Attributes [2]: [sum#87, isEmpty#88]
Results [7]: [i_category#74, i_class#75, i_brand#76, i_product_name#77, d_year#78, sum#89, isEmpty#90]

(45) RowToColumnar
Input [7]: [i_category#74, i_class#75, i_brand#76, i_product_name#77, d_year#78, sum#89, isEmpty#90]

(46) CometColumnarExchange
Input [7]: [i_category#74, i_class#75, i_brand#76, i_product_name#77, d_year#78, sum#89, isEmpty#90]
Arguments: hashpartitioning(i_category#74, i_class#75, i_brand#76, i_product_name#77, d_year#78, 5), ENSURE_REQUIREMENTS, CometColumnarShuffle, [plan_id=4]

(47) ColumnarToRow [codegen id : 11]
Input [7]: [i_category#74, i_class#75, i_brand#76, i_product_name#77, d_year#78, sum#89, isEmpty#90]

(48) HashAggregate [codegen id : 11]
Input [7]: [i_category#74, i_class#75, i_brand#76, i_product_name#77, d_year#78, sum#89, isEmpty#90]
Keys [5]: [i_category#74, i_class#75, i_brand#76, i_product_name#77, d_year#78]
Functions [1]: [sum(sumsales#86)]
Aggregate Attributes [1]: [sum(sumsales#86)#91]
Results [9]: [i_category#74, i_class#75, i_brand#76, i_product_name#77, d_year#78, null AS d_qoy#92, null AS d_moy#93, null AS s_store_id#94, sum(sumsales#86)#91 AS sumsales#95]

(49) ReusedExchange [Reuses operator id: 22]
Output [10]: [i_category#96, i_class#97, i_brand#98, i_product_name#99, d_year#100, d_qoy#101, d_moy#102, s_store_id#103, sum#104, isEmpty#105]

(50) ColumnarToRow [codegen id : 13]
Input [10]: [i_category#96, i_class#97, i_brand#98, i_product_name#99, d_year#100, d_qoy#101, d_moy#102, s_store_id#103, sum#104, isEmpty#105]

(51) HashAggregate [codegen id : 13]
Input [10]: [i_category#96, i_class#97, i_brand#98, i_product_name#99, d_year#100, d_qoy#101, d_moy#102, s_store_id#103, sum#104, isEmpty#105]
Keys [8]: [i_category#96, i_class#97, i_brand#98, i_product_name#99, d_year#100, d_qoy#101, d_moy#102, s_store_id#103]
Functions [1]: [sum(coalesce((ss_sales_price#106 * cast(ss_quantity#107 as decimal(10,0))), 0.00))]
Aggregate Attributes [1]: [sum(coalesce((ss_sales_price#106 * cast(ss_quantity#107 as decimal(10,0))), 0.00))#23]
Results [5]: [i_category#96, i_class#97, i_brand#98, i_product_name#99, sum(coalesce((ss_sales_price#106 * cast(ss_quantity#107 as decimal(10,0))), 0.00))#23 AS sumsales#108]

(52) HashAggregate [codegen id : 13]
Input [5]: [i_category#96, i_class#97, i_brand#98, i_product_name#99, sumsales#108]
Keys [4]: [i_category#96, i_class#97, i_brand#98, i_product_name#99]
Functions [1]: [partial_sum(sumsales#108)]
Aggregate Attributes [2]: [sum#109, isEmpty#110]
Results [6]: [i_category#96, i_class#97, i_brand#98, i_product_name#99, sum#111, isEmpty#112]

(53) RowToColumnar
Input [6]: [i_category#96, i_class#97, i_brand#98, i_product_name#99, sum#111, isEmpty#112]

(54) CometColumnarExchange
Input [6]: [i_category#96, i_class#97, i_brand#98, i_product_name#99, sum#111, isEmpty#112]
Arguments: hashpartitioning(i_category#96, i_class#97, i_brand#98, i_product_name#99, 5), ENSURE_REQUIREMENTS, CometColumnarShuffle, [plan_id=5]

(55) ColumnarToRow [codegen id : 14]
Input [6]: [i_category#96, i_class#97, i_brand#98, i_product_name#99, sum#111, isEmpty#112]

(56) HashAggregate [codegen id : 14]
Input [6]: [i_category#96, i_class#97, i_brand#98, i_product_name#99, sum#111, isEmpty#112]
Keys [4]: [i_category#96, i_class#97, i_brand#98, i_product_name#99]
Functions [1]: [sum(sumsales#108)]
Aggregate Attributes [1]: [sum(sumsales#108)#113]
Results [9]: [i_category#96, i_class#97, i_brand#98, i_product_name#99, null AS d_year#114, null AS d_qoy#115, null AS d_moy#116, null AS s_store_id#117, sum(sumsales#108)#113 AS sumsales#118]

(57) ReusedExchange [Reuses operator id: 22]
Output [10]: [i_category#119, i_class#120, i_brand#121, i_product_name#122, d_year#123, d_qoy#124, d_moy#125, s_store_id#126, sum#127, isEmpty#128]

(58) ColumnarToRow [codegen id : 16]
Input [10]: [i_category#119, i_class#120, i_brand#121, i_product_name#122, d_year#123, d_qoy#124, d_moy#125, s_store_id#126, sum#127, isEmpty#128]

(59) HashAggregate [codegen id : 16]
Input [10]: [i_category#119, i_class#120, i_brand#121, i_product_name#122, d_year#123, d_qoy#124, d_moy#125, s_store_id#126, sum#127, isEmpty#128]
Keys [8]: [i_category#119, i_class#120, i_brand#121, i_product_name#122, d_year#123, d_qoy#124, d_moy#125, s_store_id#126]
Functions [1]: [sum(coalesce((ss_sales_price#129 * cast(ss_quantity#130 as decimal(10,0))), 0.00))]
Aggregate Attributes [1]: [sum(coalesce((ss_sales_price#129 * cast(ss_quantity#130 as decimal(10,0))), 0.00))#23]
Results [4]: [i_category#119, i_class#120, i_brand#121, sum(coalesce((ss_sales_price#129 * cast(ss_quantity#130 as decimal(10,0))), 0.00))#23 AS sumsales#131]

(60) HashAggregate [codegen id : 16]
Input [4]: [i_category#119, i_class#120, i_brand#121, sumsales#131]
Keys [3]: [i_category#119, i_class#120, i_brand#121]
Functions [1]: [partial_sum(sumsales#131)]
Aggregate Attributes [2]: [sum#132, isEmpty#133]
Results [5]: [i_category#119, i_class#120, i_brand#121, sum#134, isEmpty#135]

(61) RowToColumnar
Input [5]: [i_category#119, i_class#120, i_brand#121, sum#134, isEmpty#135]

(62) CometColumnarExchange
Input [5]: [i_category#119, i_class#120, i_brand#121, sum#134, isEmpty#135]
Arguments: hashpartitioning(i_category#119, i_class#120, i_brand#121, 5), ENSURE_REQUIREMENTS, CometColumnarShuffle, [plan_id=6]

(63) ColumnarToRow [codegen id : 17]
Input [5]: [i_category#119, i_class#120, i_brand#121, sum#134, isEmpty#135]

(64) HashAggregate [codegen id : 17]
Input [5]: [i_category#119, i_class#120, i_brand#121, sum#134, isEmpty#135]
Keys [3]: [i_category#119, i_class#120, i_brand#121]
Functions [1]: [sum(sumsales#131)]
Aggregate Attributes [1]: [sum(sumsales#131)#136]
Results [9]: [i_category#119, i_class#120, i_brand#121, null AS i_product_name#137, null AS d_year#138, null AS d_qoy#139, null AS d_moy#140, null AS s_store_id#141, sum(sumsales#131)#136 AS sumsales#142]

(65) ReusedExchange [Reuses operator id: 22]
Output [10]: [i_category#143, i_class#144, i_brand#145, i_product_name#146, d_year#147, d_qoy#148, d_moy#149, s_store_id#150, sum#151, isEmpty#152]

(66) ColumnarToRow [codegen id : 19]
Input [10]: [i_category#143, i_class#144, i_brand#145, i_product_name#146, d_year#147, d_qoy#148, d_moy#149, s_store_id#150, sum#151, isEmpty#152]

(67) HashAggregate [codegen id : 19]
Input [10]: [i_category#143, i_class#144, i_brand#145, i_product_name#146, d_year#147, d_qoy#148, d_moy#149, s_store_id#150, sum#151, isEmpty#152]
Keys [8]: [i_category#143, i_class#144, i_brand#145, i_product_name#146, d_year#147, d_qoy#148, d_moy#149, s_store_id#150]
Functions [1]: [sum(coalesce((ss_sales_price#153 * cast(ss_quantity#154 as decimal(10,0))), 0.00))]
Aggregate Attributes [1]: [sum(coalesce((ss_sales_price#153 * cast(ss_quantity#154 as decimal(10,0))), 0.00))#23]
Results [3]: [i_category#143, i_class#144, sum(coalesce((ss_sales_price#153 * cast(ss_quantity#154 as decimal(10,0))), 0.00))#23 AS sumsales#155]

(68) HashAggregate [codegen id : 19]
Input [3]: [i_category#143, i_class#144, sumsales#155]
Keys [2]: [i_category#143, i_class#144]
Functions [1]: [partial_sum(sumsales#155)]
Aggregate Attributes [2]: [sum#156, isEmpty#157]
Results [4]: [i_category#143, i_class#144, sum#158, isEmpty#159]

(69) RowToColumnar
Input [4]: [i_category#143, i_class#144, sum#158, isEmpty#159]

(70) CometColumnarExchange
Input [4]: [i_category#143, i_class#144, sum#158, isEmpty#159]
Arguments: hashpartitioning(i_category#143, i_class#144, 5), ENSURE_REQUIREMENTS, CometColumnarShuffle, [plan_id=7]

(71) ColumnarToRow [codegen id : 20]
Input [4]: [i_category#143, i_class#144, sum#158, isEmpty#159]

(72) HashAggregate [codegen id : 20]
Input [4]: [i_category#143, i_class#144, sum#158, isEmpty#159]
Keys [2]: [i_category#143, i_class#144]
Functions [1]: [sum(sumsales#155)]
Aggregate Attributes [1]: [sum(sumsales#155)#160]
Results [9]: [i_category#143, i_class#144, null AS i_brand#161, null AS i_product_name#162, null AS d_year#163, null AS d_qoy#164, null AS d_moy#165, null AS s_store_id#166, sum(sumsales#155)#160 AS sumsales#167]

(73) ReusedExchange [Reuses operator id: 22]
Output [10]: [i_category#168, i_class#169, i_brand#170, i_product_name#171, d_year#172, d_qoy#173, d_moy#174, s_store_id#175, sum#176, isEmpty#177]

(74) ColumnarToRow [codegen id : 22]
Input [10]: [i_category#168, i_class#169, i_brand#170, i_product_name#171, d_year#172, d_qoy#173, d_moy#174, s_store_id#175, sum#176, isEmpty#177]

(75) HashAggregate [codegen id : 22]
Input [10]: [i_category#168, i_class#169, i_brand#170, i_product_name#171, d_year#172, d_qoy#173, d_moy#174, s_store_id#175, sum#176, isEmpty#177]
Keys [8]: [i_category#168, i_class#169, i_brand#170, i_product_name#171, d_year#172, d_qoy#173, d_moy#174, s_store_id#175]
Functions [1]: [sum(coalesce((ss_sales_price#178 * cast(ss_quantity#179 as decimal(10,0))), 0.00))]
Aggregate Attributes [1]: [sum(coalesce((ss_sales_price#178 * cast(ss_quantity#179 as decimal(10,0))), 0.00))#23]
Results [2]: [i_category#168, sum(coalesce((ss_sales_price#178 * cast(ss_quantity#179 as decimal(10,0))), 0.00))#23 AS sumsales#180]

(76) HashAggregate [codegen id : 22]
Input [2]: [i_category#168, sumsales#180]
Keys [1]: [i_category#168]
Functions [1]: [partial_sum(sumsales#180)]
Aggregate Attributes [2]: [sum#181, isEmpty#182]
Results [3]: [i_category#168, sum#183, isEmpty#184]

(77) RowToColumnar
Input [3]: [i_category#168, sum#183, isEmpty#184]

(78) CometColumnarExchange
Input [3]: [i_category#168, sum#183, isEmpty#184]
Arguments: hashpartitioning(i_category#168, 5), ENSURE_REQUIREMENTS, CometColumnarShuffle, [plan_id=8]

(79) ColumnarToRow [codegen id : 23]
Input [3]: [i_category#168, sum#183, isEmpty#184]

(80) HashAggregate [codegen id : 23]
Input [3]: [i_category#168, sum#183, isEmpty#184]
Keys [1]: [i_category#168]
Functions [1]: [sum(sumsales#180)]
Aggregate Attributes [1]: [sum(sumsales#180)#185]
Results [9]: [i_category#168, null AS i_class#186, null AS i_brand#187, null AS i_product_name#188, null AS d_year#189, null AS d_qoy#190, null AS d_moy#191, null AS s_store_id#192, sum(sumsales#180)#185 AS sumsales#193]

(81) ReusedExchange [Reuses operator id: 22]
Output [10]: [i_category#194, i_class#195, i_brand#196, i_product_name#197, d_year#198, d_qoy#199, d_moy#200, s_store_id#201, sum#202, isEmpty#203]

(82) ColumnarToRow [codegen id : 25]
Input [10]: [i_category#194, i_class#195, i_brand#196, i_product_name#197, d_year#198, d_qoy#199, d_moy#200, s_store_id#201, sum#202, isEmpty#203]

(83) HashAggregate [codegen id : 25]
Input [10]: [i_category#194, i_class#195, i_brand#196, i_product_name#197, d_year#198, d_qoy#199, d_moy#200, s_store_id#201, sum#202, isEmpty#203]
Keys [8]: [i_category#194, i_class#195, i_brand#196, i_product_name#197, d_year#198, d_qoy#199, d_moy#200, s_store_id#201]
Functions [1]: [sum(coalesce((ss_sales_price#204 * cast(ss_quantity#205 as decimal(10,0))), 0.00))]
Aggregate Attributes [1]: [sum(coalesce((ss_sales_price#204 * cast(ss_quantity#205 as decimal(10,0))), 0.00))#23]
Results [1]: [sum(coalesce((ss_sales_price#204 * cast(ss_quantity#205 as decimal(10,0))), 0.00))#23 AS sumsales#206]

(84) HashAggregate [codegen id : 25]
Input [1]: [sumsales#206]
Keys: []
Functions [1]: [partial_sum(sumsales#206)]
Aggregate Attributes [2]: [sum#207, isEmpty#208]
Results [2]: [sum#209, isEmpty#210]

(85) RowToColumnar
Input [2]: [sum#209, isEmpty#210]

(86) CometColumnarExchange
Input [2]: [sum#209, isEmpty#210]
Arguments: SinglePartition, ENSURE_REQUIREMENTS, CometColumnarShuffle, [plan_id=9]

(87) ColumnarToRow [codegen id : 26]
Input [2]: [sum#209, isEmpty#210]

(88) HashAggregate [codegen id : 26]
Input [2]: [sum#209, isEmpty#210]
Keys: []
Functions [1]: [sum(sumsales#206)]
Aggregate Attributes [1]: [sum(sumsales#206)#211]
Results [9]: [null AS i_category#212, null AS i_class#213, null AS i_brand#214, null AS i_product_name#215, null AS d_year#216, null AS d_qoy#217, null AS d_moy#218, null AS s_store_id#219, sum(sumsales#206)#211 AS sumsales#220]

(89) Union

(90) Sort [codegen id : 27]
Input [9]: [i_category#24, i_class#25, i_brand#26, i_product_name#27, d_year#28, d_qoy#29, d_moy#30, s_store_id#31, sumsales#32]
Arguments: [i_category#24 ASC NULLS FIRST, sumsales#32 DESC NULLS LAST], false, 0

(91) WindowGroupLimit
Input [9]: [i_category#24, i_class#25, i_brand#26, i_product_name#27, d_year#28, d_qoy#29, d_moy#30, s_store_id#31, sumsales#32]
Arguments: [i_category#24], [sumsales#32 DESC NULLS LAST], rank(sumsales#32), 100, Partial

(92) RowToColumnar
Input [9]: [i_category#24, i_class#25, i_brand#26, i_product_name#27, d_year#28, d_qoy#29, d_moy#30, s_store_id#31, sumsales#32]

(93) CometColumnarExchange
Input [9]: [i_category#24, i_class#25, i_brand#26, i_product_name#27, d_year#28, d_qoy#29, d_moy#30, s_store_id#31, sumsales#32]
Arguments: hashpartitioning(i_category#24, 5), ENSURE_REQUIREMENTS, CometColumnarShuffle, [plan_id=10]

(94) CometSort
Input [9]: [i_category#24, i_class#25, i_brand#26, i_product_name#27, d_year#28, d_qoy#29, d_moy#30, s_store_id#31, sumsales#32]
Arguments: [i_category#24, i_class#25, i_brand#26, i_product_name#27, d_year#28, d_qoy#29, d_moy#30, s_store_id#31, sumsales#32], [i_category#24 ASC NULLS FIRST, sumsales#32 DESC NULLS LAST]

(95) ColumnarToRow [codegen id : 28]
Input [9]: [i_category#24, i_class#25, i_brand#26, i_product_name#27, d_year#28, d_qoy#29, d_moy#30, s_store_id#31, sumsales#32]

(96) WindowGroupLimit
Input [9]: [i_category#24, i_class#25, i_brand#26, i_product_name#27, d_year#28, d_qoy#29, d_moy#30, s_store_id#31, sumsales#32]
Arguments: [i_category#24], [sumsales#32 DESC NULLS LAST], rank(sumsales#32), 100, Final

(97) Window
Input [9]: [i_category#24, i_class#25, i_brand#26, i_product_name#27, d_year#28, d_qoy#29, d_moy#30, s_store_id#31, sumsales#32]
Arguments: [rank(sumsales#32) windowspecdefinition(i_category#24, sumsales#32 DESC NULLS LAST, specifiedwindowframe(RowFrame, unboundedpreceding$(), currentrow$())) AS rk#221], [i_category#24], [sumsales#32 DESC NULLS LAST]

(98) Filter [codegen id : 29]
Input [10]: [i_category#24, i_class#25, i_brand#26, i_product_name#27, d_year#28, d_qoy#29, d_moy#30, s_store_id#31, sumsales#32, rk#221]
Condition : (rk#221 <= 100)

(99) TakeOrderedAndProject
Input [10]: [i_category#24, i_class#25, i_brand#26, i_product_name#27, d_year#28, d_qoy#29, d_moy#30, s_store_id#31, sumsales#32, rk#221]
Arguments: 100, [i_category#24 ASC NULLS FIRST, i_class#25 ASC NULLS FIRST, i_brand#26 ASC NULLS FIRST, i_product_name#27 ASC NULLS FIRST, d_year#28 ASC NULLS FIRST, d_qoy#29 ASC NULLS FIRST, d_moy#30 ASC NULLS FIRST, s_store_id#31 ASC NULLS FIRST, sumsales#32 ASC NULLS FIRST, rk#221 ASC NULLS FIRST], [i_category#24, i_class#25, i_brand#26, i_product_name#27, d_year#28, d_qoy#29, d_moy#30, s_store_id#31, sumsales#32, rk#221]

===== Subqueries =====

Subquery:1 Hosting operator id = 1 Hosting Expression = ss_sold_date_sk#5 IN dynamicpruning#6
BroadcastExchange (104)
+- * ColumnarToRow (103)
   +- CometProject (102)
      +- CometFilter (101)
         +- CometScan parquet spark_catalog.default.date_dim (100)


(100) Scan parquet spark_catalog.default.date_dim
Output [5]: [d_date_sk#7, d_month_seq#8, d_year#9, d_moy#10, d_qoy#11]
Batched: true
Location [not included in comparison]/{warehouse_dir}/date_dim]
PushedFilters: [IsNotNull(d_month_seq), GreaterThanOrEqual(d_month_seq,1212), LessThanOrEqual(d_month_seq,1223), IsNotNull(d_date_sk)]
ReadSchema: struct<d_date_sk:int,d_month_seq:int,d_year:int,d_moy:int,d_qoy:int>

(101) CometFilter
Input [5]: [d_date_sk#7, d_month_seq#8, d_year#9, d_moy#10, d_qoy#11]
Condition : (((isnotnull(d_month_seq#8) AND (d_month_seq#8 >= 1212)) AND (d_month_seq#8 <= 1223)) AND isnotnull(d_date_sk#7))

(102) CometProject
Input [5]: [d_date_sk#7, d_month_seq#8, d_year#9, d_moy#10, d_qoy#11]
Arguments: [d_date_sk#7, d_year#9, d_moy#10, d_qoy#11], [d_date_sk#7, d_year#9, d_moy#10, d_qoy#11]

(103) ColumnarToRow [codegen id : 1]
Input [4]: [d_date_sk#7, d_year#9, d_moy#10, d_qoy#11]

(104) BroadcastExchange
Input [4]: [d_date_sk#7, d_year#9, d_moy#10, d_qoy#11]
Arguments: HashedRelationBroadcastMode(List(cast(input[0, int, true] as bigint)),false), [plan_id=11]


