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


(1) CometScan 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) CometScan 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) CometScan 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) CometProject
Input [2]: [s_store_sk#12, s_store_id#13]
Arguments: [s_store_sk#12, s_store_id#14], [s_store_sk#12, staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, s_store_id#13, 16, true, false, true) AS s_store_id#14]

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

(13) 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#14]
Arguments: [ss_store_sk#2], [s_store_sk#12], Inner, BuildRight

(14) 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#14]
Arguments: [ss_item_sk#1, ss_quantity#3, ss_sales_price#4, d_year#9, d_moy#10, d_qoy#11, s_store_id#14], [ss_item_sk#1, ss_quantity#3, ss_sales_price#4, d_year#9, d_moy#10, d_qoy#11, s_store_id#14]

(15) CometScan parquet spark_catalog.default.item
Output [5]: [i_item_sk#15, i_brand#16, i_class#17, i_category#18, i_product_name#19]
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>

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

(17) CometProject
Input [5]: [i_item_sk#15, i_brand#16, i_class#17, i_category#18, i_product_name#19]
Arguments: [i_item_sk#15, i_brand#20, i_class#21, i_category#22, i_product_name#23], [i_item_sk#15, staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, i_brand#16, 50, true, false, true) AS i_brand#20, staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, i_class#17, 50, true, false, true) AS i_class#21, staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, i_category#18, 50, true, false, true) AS i_category#22, staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, i_product_name#19, 50, true, false, true) AS i_product_name#23]

(18) CometBroadcastExchange
Input [5]: [i_item_sk#15, i_brand#20, i_class#21, i_category#22, i_product_name#23]
Arguments: [i_item_sk#15, i_brand#20, i_class#21, i_category#22, i_product_name#23]

(19) 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#14]
Right output [5]: [i_item_sk#15, i_brand#20, i_class#21, i_category#22, i_product_name#23]
Arguments: [ss_item_sk#1], [i_item_sk#15], Inner, BuildRight

(20) 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#14, i_item_sk#15, i_brand#20, i_class#21, i_category#22, i_product_name#23]
Arguments: [ss_quantity#3, ss_sales_price#4, d_year#9, d_moy#10, d_qoy#11, s_store_id#14, i_brand#20, i_class#21, i_category#22, i_product_name#23], [ss_quantity#3, ss_sales_price#4, d_year#9, d_moy#10, d_qoy#11, s_store_id#14, i_brand#20, i_class#21, i_category#22, i_product_name#23]

(21) CometColumnarToRow [codegen id : 1]
Input [10]: [ss_quantity#3, ss_sales_price#4, d_year#9, d_moy#10, d_qoy#11, s_store_id#14, i_brand#20, i_class#21, i_category#22, i_product_name#23]

(22) 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#14, i_brand#20, i_class#21, i_category#22, i_product_name#23]
Keys [8]: [i_category#22, i_class#21, i_brand#20, i_product_name#23, d_year#9, d_qoy#11, d_moy#10, s_store_id#14]
Functions [1]: [partial_sum(coalesce((ss_sales_price#4 * cast(ss_quantity#3 as decimal(10,0))), 0.00))]
Aggregate Attributes [2]: [sum#24, isEmpty#25]
Results [10]: [i_category#22, i_class#21, i_brand#20, i_product_name#23, d_year#9, d_qoy#11, d_moy#10, s_store_id#14, sum#26, isEmpty#27]

(23) CometColumnarExchange
Input [10]: [i_category#22, i_class#21, i_brand#20, i_product_name#23, d_year#9, d_qoy#11, d_moy#10, s_store_id#14, sum#26, isEmpty#27]
Arguments: hashpartitioning(i_category#22, i_class#21, i_brand#20, i_product_name#23, d_year#9, d_qoy#11, d_moy#10, s_store_id#14, 5), ENSURE_REQUIREMENTS, CometColumnarShuffle, [plan_id=1]

(24) CometColumnarToRow [codegen id : 2]
Input [10]: [i_category#22, i_class#21, i_brand#20, i_product_name#23, d_year#9, d_qoy#11, d_moy#10, s_store_id#14, sum#26, isEmpty#27]

(25) HashAggregate [codegen id : 2]
Input [10]: [i_category#22, i_class#21, i_brand#20, i_product_name#23, d_year#9, d_qoy#11, d_moy#10, s_store_id#14, sum#26, isEmpty#27]
Keys [8]: [i_category#22, i_class#21, i_brand#20, i_product_name#23, d_year#9, d_qoy#11, d_moy#10, s_store_id#14]
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))#28]
Results [9]: [i_category#22 AS i_category#29, i_class#21 AS i_class#30, i_brand#20 AS i_brand#31, i_product_name#23 AS i_product_name#32, d_year#9 AS d_year#33, d_qoy#11 AS d_qoy#34, d_moy#10 AS d_moy#35, s_store_id#14 AS s_store_id#36, cast(sum(coalesce((ss_sales_price#4 * cast(ss_quantity#3 as decimal(10,0))), 0.00))#28 as decimal(38,2)) AS sumsales#37]

(26) ReusedExchange [Reuses operator id: 23]
Output [10]: [i_category#38, i_class#39, i_brand#40, i_product_name#41, d_year#42, d_qoy#43, d_moy#44, s_store_id#45, sum#46, isEmpty#47]

(27) CometColumnarToRow [codegen id : 4]
Input [10]: [i_category#38, i_class#39, i_brand#40, i_product_name#41, d_year#42, d_qoy#43, d_moy#44, s_store_id#45, sum#46, isEmpty#47]

(28) HashAggregate [codegen id : 4]
Input [10]: [i_category#38, i_class#39, i_brand#40, i_product_name#41, d_year#42, d_qoy#43, d_moy#44, s_store_id#45, sum#46, isEmpty#47]
Keys [8]: [i_category#38, i_class#39, i_brand#40, i_product_name#41, d_year#42, d_qoy#43, d_moy#44, s_store_id#45]
Functions [1]: [sum(coalesce((ss_sales_price#48 * cast(ss_quantity#49 as decimal(10,0))), 0.00))]
Aggregate Attributes [1]: [sum(coalesce((ss_sales_price#48 * cast(ss_quantity#49 as decimal(10,0))), 0.00))#28]
Results [8]: [i_category#38, i_class#39, i_brand#40, i_product_name#41, d_year#42, d_qoy#43, d_moy#44, sum(coalesce((ss_sales_price#48 * cast(ss_quantity#49 as decimal(10,0))), 0.00))#28 AS sumsales#50]

(29) HashAggregate [codegen id : 4]
Input [8]: [i_category#38, i_class#39, i_brand#40, i_product_name#41, d_year#42, d_qoy#43, d_moy#44, sumsales#50]
Keys [7]: [i_category#38, i_class#39, i_brand#40, i_product_name#41, d_year#42, d_qoy#43, d_moy#44]
Functions [1]: [partial_sum(sumsales#50)]
Aggregate Attributes [2]: [sum#51, isEmpty#52]
Results [9]: [i_category#38, i_class#39, i_brand#40, i_product_name#41, d_year#42, d_qoy#43, d_moy#44, sum#53, isEmpty#54]

(30) CometColumnarExchange
Input [9]: [i_category#38, i_class#39, i_brand#40, i_product_name#41, d_year#42, d_qoy#43, d_moy#44, sum#53, isEmpty#54]
Arguments: hashpartitioning(i_category#38, i_class#39, i_brand#40, i_product_name#41, d_year#42, d_qoy#43, d_moy#44, 5), ENSURE_REQUIREMENTS, CometColumnarShuffle, [plan_id=2]

(31) CometColumnarToRow [codegen id : 5]
Input [9]: [i_category#38, i_class#39, i_brand#40, i_product_name#41, d_year#42, d_qoy#43, d_moy#44, sum#53, isEmpty#54]

(32) HashAggregate [codegen id : 5]
Input [9]: [i_category#38, i_class#39, i_brand#40, i_product_name#41, d_year#42, d_qoy#43, d_moy#44, sum#53, isEmpty#54]
Keys [7]: [i_category#38, i_class#39, i_brand#40, i_product_name#41, d_year#42, d_qoy#43, d_moy#44]
Functions [1]: [sum(sumsales#50)]
Aggregate Attributes [1]: [sum(sumsales#50)#55]
Results [9]: [i_category#38, i_class#39, i_brand#40, i_product_name#41, d_year#42, d_qoy#43, d_moy#44, null AS s_store_id#56, sum(sumsales#50)#55 AS sumsales#57]

(33) ReusedExchange [Reuses operator id: 23]
Output [10]: [i_category#58, i_class#59, i_brand#60, i_product_name#61, d_year#62, d_qoy#63, d_moy#64, s_store_id#65, sum#66, isEmpty#67]

(34) CometColumnarToRow [codegen id : 7]
Input [10]: [i_category#58, i_class#59, i_brand#60, i_product_name#61, d_year#62, d_qoy#63, d_moy#64, s_store_id#65, sum#66, isEmpty#67]

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

(36) HashAggregate [codegen id : 7]
Input [7]: [i_category#58, i_class#59, i_brand#60, i_product_name#61, d_year#62, d_qoy#63, sumsales#70]
Keys [6]: [i_category#58, i_class#59, i_brand#60, i_product_name#61, d_year#62, d_qoy#63]
Functions [1]: [partial_sum(sumsales#70)]
Aggregate Attributes [2]: [sum#71, isEmpty#72]
Results [8]: [i_category#58, i_class#59, i_brand#60, i_product_name#61, d_year#62, d_qoy#63, sum#73, isEmpty#74]

(37) CometColumnarExchange
Input [8]: [i_category#58, i_class#59, i_brand#60, i_product_name#61, d_year#62, d_qoy#63, sum#73, isEmpty#74]
Arguments: hashpartitioning(i_category#58, i_class#59, i_brand#60, i_product_name#61, d_year#62, d_qoy#63, 5), ENSURE_REQUIREMENTS, CometColumnarShuffle, [plan_id=3]

(38) CometColumnarToRow [codegen id : 8]
Input [8]: [i_category#58, i_class#59, i_brand#60, i_product_name#61, d_year#62, d_qoy#63, sum#73, isEmpty#74]

(39) HashAggregate [codegen id : 8]
Input [8]: [i_category#58, i_class#59, i_brand#60, i_product_name#61, d_year#62, d_qoy#63, sum#73, isEmpty#74]
Keys [6]: [i_category#58, i_class#59, i_brand#60, i_product_name#61, d_year#62, d_qoy#63]
Functions [1]: [sum(sumsales#70)]
Aggregate Attributes [1]: [sum(sumsales#70)#75]
Results [9]: [i_category#58, i_class#59, i_brand#60, i_product_name#61, d_year#62, d_qoy#63, null AS d_moy#76, null AS s_store_id#77, sum(sumsales#70)#75 AS sumsales#78]

(40) ReusedExchange [Reuses operator id: 23]
Output [10]: [i_category#79, i_class#80, i_brand#81, i_product_name#82, d_year#83, d_qoy#84, d_moy#85, s_store_id#86, sum#87, isEmpty#88]

(41) CometColumnarToRow [codegen id : 10]
Input [10]: [i_category#79, i_class#80, i_brand#81, i_product_name#82, d_year#83, d_qoy#84, d_moy#85, s_store_id#86, sum#87, isEmpty#88]

(42) HashAggregate [codegen id : 10]
Input [10]: [i_category#79, i_class#80, i_brand#81, i_product_name#82, d_year#83, d_qoy#84, d_moy#85, s_store_id#86, sum#87, isEmpty#88]
Keys [8]: [i_category#79, i_class#80, i_brand#81, i_product_name#82, d_year#83, d_qoy#84, d_moy#85, s_store_id#86]
Functions [1]: [sum(coalesce((ss_sales_price#89 * cast(ss_quantity#90 as decimal(10,0))), 0.00))]
Aggregate Attributes [1]: [sum(coalesce((ss_sales_price#89 * cast(ss_quantity#90 as decimal(10,0))), 0.00))#28]
Results [6]: [i_category#79, i_class#80, i_brand#81, i_product_name#82, d_year#83, sum(coalesce((ss_sales_price#89 * cast(ss_quantity#90 as decimal(10,0))), 0.00))#28 AS sumsales#91]

(43) HashAggregate [codegen id : 10]
Input [6]: [i_category#79, i_class#80, i_brand#81, i_product_name#82, d_year#83, sumsales#91]
Keys [5]: [i_category#79, i_class#80, i_brand#81, i_product_name#82, d_year#83]
Functions [1]: [partial_sum(sumsales#91)]
Aggregate Attributes [2]: [sum#92, isEmpty#93]
Results [7]: [i_category#79, i_class#80, i_brand#81, i_product_name#82, d_year#83, sum#94, isEmpty#95]

(44) CometColumnarExchange
Input [7]: [i_category#79, i_class#80, i_brand#81, i_product_name#82, d_year#83, sum#94, isEmpty#95]
Arguments: hashpartitioning(i_category#79, i_class#80, i_brand#81, i_product_name#82, d_year#83, 5), ENSURE_REQUIREMENTS, CometColumnarShuffle, [plan_id=4]

(45) CometColumnarToRow [codegen id : 11]
Input [7]: [i_category#79, i_class#80, i_brand#81, i_product_name#82, d_year#83, sum#94, isEmpty#95]

(46) HashAggregate [codegen id : 11]
Input [7]: [i_category#79, i_class#80, i_brand#81, i_product_name#82, d_year#83, sum#94, isEmpty#95]
Keys [5]: [i_category#79, i_class#80, i_brand#81, i_product_name#82, d_year#83]
Functions [1]: [sum(sumsales#91)]
Aggregate Attributes [1]: [sum(sumsales#91)#96]
Results [9]: [i_category#79, i_class#80, i_brand#81, i_product_name#82, d_year#83, null AS d_qoy#97, null AS d_moy#98, null AS s_store_id#99, sum(sumsales#91)#96 AS sumsales#100]

(47) ReusedExchange [Reuses operator id: 23]
Output [10]: [i_category#101, i_class#102, i_brand#103, i_product_name#104, d_year#105, d_qoy#106, d_moy#107, s_store_id#108, sum#109, isEmpty#110]

(48) CometColumnarToRow [codegen id : 13]
Input [10]: [i_category#101, i_class#102, i_brand#103, i_product_name#104, d_year#105, d_qoy#106, d_moy#107, s_store_id#108, sum#109, isEmpty#110]

(49) HashAggregate [codegen id : 13]
Input [10]: [i_category#101, i_class#102, i_brand#103, i_product_name#104, d_year#105, d_qoy#106, d_moy#107, s_store_id#108, sum#109, isEmpty#110]
Keys [8]: [i_category#101, i_class#102, i_brand#103, i_product_name#104, d_year#105, d_qoy#106, d_moy#107, s_store_id#108]
Functions [1]: [sum(coalesce((ss_sales_price#111 * cast(ss_quantity#112 as decimal(10,0))), 0.00))]
Aggregate Attributes [1]: [sum(coalesce((ss_sales_price#111 * cast(ss_quantity#112 as decimal(10,0))), 0.00))#28]
Results [5]: [i_category#101, i_class#102, i_brand#103, i_product_name#104, sum(coalesce((ss_sales_price#111 * cast(ss_quantity#112 as decimal(10,0))), 0.00))#28 AS sumsales#113]

(50) HashAggregate [codegen id : 13]
Input [5]: [i_category#101, i_class#102, i_brand#103, i_product_name#104, sumsales#113]
Keys [4]: [i_category#101, i_class#102, i_brand#103, i_product_name#104]
Functions [1]: [partial_sum(sumsales#113)]
Aggregate Attributes [2]: [sum#114, isEmpty#115]
Results [6]: [i_category#101, i_class#102, i_brand#103, i_product_name#104, sum#116, isEmpty#117]

(51) CometColumnarExchange
Input [6]: [i_category#101, i_class#102, i_brand#103, i_product_name#104, sum#116, isEmpty#117]
Arguments: hashpartitioning(i_category#101, i_class#102, i_brand#103, i_product_name#104, 5), ENSURE_REQUIREMENTS, CometColumnarShuffle, [plan_id=5]

(52) CometColumnarToRow [codegen id : 14]
Input [6]: [i_category#101, i_class#102, i_brand#103, i_product_name#104, sum#116, isEmpty#117]

(53) HashAggregate [codegen id : 14]
Input [6]: [i_category#101, i_class#102, i_brand#103, i_product_name#104, sum#116, isEmpty#117]
Keys [4]: [i_category#101, i_class#102, i_brand#103, i_product_name#104]
Functions [1]: [sum(sumsales#113)]
Aggregate Attributes [1]: [sum(sumsales#113)#118]
Results [9]: [i_category#101, i_class#102, i_brand#103, i_product_name#104, null AS d_year#119, null AS d_qoy#120, null AS d_moy#121, null AS s_store_id#122, sum(sumsales#113)#118 AS sumsales#123]

(54) ReusedExchange [Reuses operator id: 23]
Output [10]: [i_category#124, i_class#125, i_brand#126, i_product_name#127, d_year#128, d_qoy#129, d_moy#130, s_store_id#131, sum#132, isEmpty#133]

(55) CometColumnarToRow [codegen id : 16]
Input [10]: [i_category#124, i_class#125, i_brand#126, i_product_name#127, d_year#128, d_qoy#129, d_moy#130, s_store_id#131, sum#132, isEmpty#133]

(56) HashAggregate [codegen id : 16]
Input [10]: [i_category#124, i_class#125, i_brand#126, i_product_name#127, d_year#128, d_qoy#129, d_moy#130, s_store_id#131, sum#132, isEmpty#133]
Keys [8]: [i_category#124, i_class#125, i_brand#126, i_product_name#127, d_year#128, d_qoy#129, d_moy#130, s_store_id#131]
Functions [1]: [sum(coalesce((ss_sales_price#134 * cast(ss_quantity#135 as decimal(10,0))), 0.00))]
Aggregate Attributes [1]: [sum(coalesce((ss_sales_price#134 * cast(ss_quantity#135 as decimal(10,0))), 0.00))#28]
Results [4]: [i_category#124, i_class#125, i_brand#126, sum(coalesce((ss_sales_price#134 * cast(ss_quantity#135 as decimal(10,0))), 0.00))#28 AS sumsales#136]

(57) HashAggregate [codegen id : 16]
Input [4]: [i_category#124, i_class#125, i_brand#126, sumsales#136]
Keys [3]: [i_category#124, i_class#125, i_brand#126]
Functions [1]: [partial_sum(sumsales#136)]
Aggregate Attributes [2]: [sum#137, isEmpty#138]
Results [5]: [i_category#124, i_class#125, i_brand#126, sum#139, isEmpty#140]

(58) CometColumnarExchange
Input [5]: [i_category#124, i_class#125, i_brand#126, sum#139, isEmpty#140]
Arguments: hashpartitioning(i_category#124, i_class#125, i_brand#126, 5), ENSURE_REQUIREMENTS, CometColumnarShuffle, [plan_id=6]

(59) CometColumnarToRow [codegen id : 17]
Input [5]: [i_category#124, i_class#125, i_brand#126, sum#139, isEmpty#140]

(60) HashAggregate [codegen id : 17]
Input [5]: [i_category#124, i_class#125, i_brand#126, sum#139, isEmpty#140]
Keys [3]: [i_category#124, i_class#125, i_brand#126]
Functions [1]: [sum(sumsales#136)]
Aggregate Attributes [1]: [sum(sumsales#136)#141]
Results [9]: [i_category#124, i_class#125, i_brand#126, null AS i_product_name#142, null AS d_year#143, null AS d_qoy#144, null AS d_moy#145, null AS s_store_id#146, sum(sumsales#136)#141 AS sumsales#147]

(61) ReusedExchange [Reuses operator id: 23]
Output [10]: [i_category#148, i_class#149, i_brand#150, i_product_name#151, d_year#152, d_qoy#153, d_moy#154, s_store_id#155, sum#156, isEmpty#157]

(62) CometColumnarToRow [codegen id : 19]
Input [10]: [i_category#148, i_class#149, i_brand#150, i_product_name#151, d_year#152, d_qoy#153, d_moy#154, s_store_id#155, sum#156, isEmpty#157]

(63) HashAggregate [codegen id : 19]
Input [10]: [i_category#148, i_class#149, i_brand#150, i_product_name#151, d_year#152, d_qoy#153, d_moy#154, s_store_id#155, sum#156, isEmpty#157]
Keys [8]: [i_category#148, i_class#149, i_brand#150, i_product_name#151, d_year#152, d_qoy#153, d_moy#154, s_store_id#155]
Functions [1]: [sum(coalesce((ss_sales_price#158 * cast(ss_quantity#159 as decimal(10,0))), 0.00))]
Aggregate Attributes [1]: [sum(coalesce((ss_sales_price#158 * cast(ss_quantity#159 as decimal(10,0))), 0.00))#28]
Results [3]: [i_category#148, i_class#149, sum(coalesce((ss_sales_price#158 * cast(ss_quantity#159 as decimal(10,0))), 0.00))#28 AS sumsales#160]

(64) HashAggregate [codegen id : 19]
Input [3]: [i_category#148, i_class#149, sumsales#160]
Keys [2]: [i_category#148, i_class#149]
Functions [1]: [partial_sum(sumsales#160)]
Aggregate Attributes [2]: [sum#161, isEmpty#162]
Results [4]: [i_category#148, i_class#149, sum#163, isEmpty#164]

(65) CometColumnarExchange
Input [4]: [i_category#148, i_class#149, sum#163, isEmpty#164]
Arguments: hashpartitioning(i_category#148, i_class#149, 5), ENSURE_REQUIREMENTS, CometColumnarShuffle, [plan_id=7]

(66) CometColumnarToRow [codegen id : 20]
Input [4]: [i_category#148, i_class#149, sum#163, isEmpty#164]

(67) HashAggregate [codegen id : 20]
Input [4]: [i_category#148, i_class#149, sum#163, isEmpty#164]
Keys [2]: [i_category#148, i_class#149]
Functions [1]: [sum(sumsales#160)]
Aggregate Attributes [1]: [sum(sumsales#160)#165]
Results [9]: [i_category#148, i_class#149, null AS i_brand#166, null AS i_product_name#167, null AS d_year#168, null AS d_qoy#169, null AS d_moy#170, null AS s_store_id#171, sum(sumsales#160)#165 AS sumsales#172]

(68) ReusedExchange [Reuses operator id: 23]
Output [10]: [i_category#173, i_class#174, i_brand#175, i_product_name#176, d_year#177, d_qoy#178, d_moy#179, s_store_id#180, sum#181, isEmpty#182]

(69) CometColumnarToRow [codegen id : 22]
Input [10]: [i_category#173, i_class#174, i_brand#175, i_product_name#176, d_year#177, d_qoy#178, d_moy#179, s_store_id#180, sum#181, isEmpty#182]

(70) HashAggregate [codegen id : 22]
Input [10]: [i_category#173, i_class#174, i_brand#175, i_product_name#176, d_year#177, d_qoy#178, d_moy#179, s_store_id#180, sum#181, isEmpty#182]
Keys [8]: [i_category#173, i_class#174, i_brand#175, i_product_name#176, d_year#177, d_qoy#178, d_moy#179, s_store_id#180]
Functions [1]: [sum(coalesce((ss_sales_price#183 * cast(ss_quantity#184 as decimal(10,0))), 0.00))]
Aggregate Attributes [1]: [sum(coalesce((ss_sales_price#183 * cast(ss_quantity#184 as decimal(10,0))), 0.00))#28]
Results [2]: [i_category#173, sum(coalesce((ss_sales_price#183 * cast(ss_quantity#184 as decimal(10,0))), 0.00))#28 AS sumsales#185]

(71) HashAggregate [codegen id : 22]
Input [2]: [i_category#173, sumsales#185]
Keys [1]: [i_category#173]
Functions [1]: [partial_sum(sumsales#185)]
Aggregate Attributes [2]: [sum#186, isEmpty#187]
Results [3]: [i_category#173, sum#188, isEmpty#189]

(72) CometColumnarExchange
Input [3]: [i_category#173, sum#188, isEmpty#189]
Arguments: hashpartitioning(i_category#173, 5), ENSURE_REQUIREMENTS, CometColumnarShuffle, [plan_id=8]

(73) CometColumnarToRow [codegen id : 23]
Input [3]: [i_category#173, sum#188, isEmpty#189]

(74) HashAggregate [codegen id : 23]
Input [3]: [i_category#173, sum#188, isEmpty#189]
Keys [1]: [i_category#173]
Functions [1]: [sum(sumsales#185)]
Aggregate Attributes [1]: [sum(sumsales#185)#190]
Results [9]: [i_category#173, null AS i_class#191, null AS i_brand#192, null AS i_product_name#193, null AS d_year#194, null AS d_qoy#195, null AS d_moy#196, null AS s_store_id#197, sum(sumsales#185)#190 AS sumsales#198]

(75) ReusedExchange [Reuses operator id: 23]
Output [10]: [i_category#199, i_class#200, i_brand#201, i_product_name#202, d_year#203, d_qoy#204, d_moy#205, s_store_id#206, sum#207, isEmpty#208]

(76) CometColumnarToRow [codegen id : 25]
Input [10]: [i_category#199, i_class#200, i_brand#201, i_product_name#202, d_year#203, d_qoy#204, d_moy#205, s_store_id#206, sum#207, isEmpty#208]

(77) HashAggregate [codegen id : 25]
Input [10]: [i_category#199, i_class#200, i_brand#201, i_product_name#202, d_year#203, d_qoy#204, d_moy#205, s_store_id#206, sum#207, isEmpty#208]
Keys [8]: [i_category#199, i_class#200, i_brand#201, i_product_name#202, d_year#203, d_qoy#204, d_moy#205, s_store_id#206]
Functions [1]: [sum(coalesce((ss_sales_price#209 * cast(ss_quantity#210 as decimal(10,0))), 0.00))]
Aggregate Attributes [1]: [sum(coalesce((ss_sales_price#209 * cast(ss_quantity#210 as decimal(10,0))), 0.00))#28]
Results [1]: [sum(coalesce((ss_sales_price#209 * cast(ss_quantity#210 as decimal(10,0))), 0.00))#28 AS sumsales#211]

(78) HashAggregate [codegen id : 25]
Input [1]: [sumsales#211]
Keys: []
Functions [1]: [partial_sum(sumsales#211)]
Aggregate Attributes [2]: [sum#212, isEmpty#213]
Results [2]: [sum#214, isEmpty#215]

(79) CometColumnarExchange
Input [2]: [sum#214, isEmpty#215]
Arguments: SinglePartition, ENSURE_REQUIREMENTS, CometColumnarShuffle, [plan_id=9]

(80) CometColumnarToRow [codegen id : 26]
Input [2]: [sum#214, isEmpty#215]

(81) HashAggregate [codegen id : 26]
Input [2]: [sum#214, isEmpty#215]
Keys: []
Functions [1]: [sum(sumsales#211)]
Aggregate Attributes [1]: [sum(sumsales#211)#216]
Results [9]: [null AS i_category#217, null AS i_class#218, null AS i_brand#219, null AS i_product_name#220, null AS d_year#221, null AS d_qoy#222, null AS d_moy#223, null AS s_store_id#224, sum(sumsales#211)#216 AS sumsales#225]

(82) Union

(83) Sort [codegen id : 27]
Input [9]: [i_category#29, i_class#30, i_brand#31, i_product_name#32, d_year#33, d_qoy#34, d_moy#35, s_store_id#36, sumsales#37]
Arguments: [i_category#29 ASC NULLS FIRST, sumsales#37 DESC NULLS LAST], false, 0

(84) WindowGroupLimit
Input [9]: [i_category#29, i_class#30, i_brand#31, i_product_name#32, d_year#33, d_qoy#34, d_moy#35, s_store_id#36, sumsales#37]
Arguments: [i_category#29], [sumsales#37 DESC NULLS LAST], rank(sumsales#37), 100, Partial

(85) CometColumnarExchange
Input [9]: [i_category#29, i_class#30, i_brand#31, i_product_name#32, d_year#33, d_qoy#34, d_moy#35, s_store_id#36, sumsales#37]
Arguments: hashpartitioning(i_category#29, 5), ENSURE_REQUIREMENTS, CometColumnarShuffle, [plan_id=10]

(86) CometSort
Input [9]: [i_category#29, i_class#30, i_brand#31, i_product_name#32, d_year#33, d_qoy#34, d_moy#35, s_store_id#36, sumsales#37]
Arguments: [i_category#29, i_class#30, i_brand#31, i_product_name#32, d_year#33, d_qoy#34, d_moy#35, s_store_id#36, sumsales#37], [i_category#29 ASC NULLS FIRST, sumsales#37 DESC NULLS LAST]

(87) CometColumnarToRow [codegen id : 28]
Input [9]: [i_category#29, i_class#30, i_brand#31, i_product_name#32, d_year#33, d_qoy#34, d_moy#35, s_store_id#36, sumsales#37]

(88) WindowGroupLimit
Input [9]: [i_category#29, i_class#30, i_brand#31, i_product_name#32, d_year#33, d_qoy#34, d_moy#35, s_store_id#36, sumsales#37]
Arguments: [i_category#29], [sumsales#37 DESC NULLS LAST], rank(sumsales#37), 100, Final

(89) Window
Input [9]: [i_category#29, i_class#30, i_brand#31, i_product_name#32, d_year#33, d_qoy#34, d_moy#35, s_store_id#36, sumsales#37]
Arguments: [rank(sumsales#37) windowspecdefinition(i_category#29, sumsales#37 DESC NULLS LAST, specifiedwindowframe(RowFrame, unboundedpreceding$(), currentrow$())) AS rk#226], [i_category#29], [sumsales#37 DESC NULLS LAST]

(90) Filter [codegen id : 29]
Input [10]: [i_category#29, i_class#30, i_brand#31, i_product_name#32, d_year#33, d_qoy#34, d_moy#35, s_store_id#36, sumsales#37, rk#226]
Condition : (rk#226 <= 100)

(91) TakeOrderedAndProject
Input [10]: [i_category#29, i_class#30, i_brand#31, i_product_name#32, d_year#33, d_qoy#34, d_moy#35, s_store_id#36, sumsales#37, rk#226]
Arguments: 100, [i_category#29 ASC NULLS FIRST, i_class#30 ASC NULLS FIRST, i_brand#31 ASC NULLS FIRST, i_product_name#32 ASC NULLS FIRST, d_year#33 ASC NULLS FIRST, d_qoy#34 ASC NULLS FIRST, d_moy#35 ASC NULLS FIRST, s_store_id#36 ASC NULLS FIRST, sumsales#37 ASC NULLS FIRST, rk#226 ASC NULLS FIRST], [i_category#29, i_class#30, i_brand#31, i_product_name#32, d_year#33, d_qoy#34, d_moy#35, s_store_id#36, sumsales#37, rk#226]

===== Subqueries =====

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


(92) CometScan 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>

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

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

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

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


