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


(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) ColumnarToRow [codegen id : 4]
Input [5]: [ss_item_sk#1, ss_store_sk#2, ss_quantity#3, ss_sales_price#4, ss_sold_date_sk#5]

(3) Filter [codegen id : 4]
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))

(4) ReusedExchange [Reuses operator id: 95]
Output [4]: [d_date_sk#7, d_year#8, d_moy#9, d_qoy#10]

(5) BroadcastHashJoin [codegen id : 4]
Left keys [1]: [ss_sold_date_sk#5]
Right keys [1]: [d_date_sk#7]
Join type: Inner
Join condition: None

(6) Project [codegen id : 4]
Output [7]: [ss_item_sk#1, ss_store_sk#2, ss_quantity#3, ss_sales_price#4, d_year#8, d_moy#9, d_qoy#10]
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#8, d_moy#9, d_qoy#10]

(7) CometNativeScan parquet spark_catalog.default.store
Output [2]: [s_store_sk#11, s_store_id#12]
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>

(8) CometFilter
Input [2]: [s_store_sk#11, s_store_id#12]
Condition : isnotnull(s_store_sk#11)

(9) CometProject
Input [2]: [s_store_sk#11, s_store_id#12]
Arguments: [s_store_sk#11, s_store_id#13], [s_store_sk#11, staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, s_store_id#12, 16, true, false, true) AS s_store_id#13]

(10) CometColumnarToRow [codegen id : 2]
Input [2]: [s_store_sk#11, s_store_id#13]

(11) BroadcastExchange
Input [2]: [s_store_sk#11, s_store_id#13]
Arguments: HashedRelationBroadcastMode(List(cast(input[0, int, true] as bigint)),false), [plan_id=1]

(12) BroadcastHashJoin [codegen id : 4]
Left keys [1]: [ss_store_sk#2]
Right keys [1]: [s_store_sk#11]
Join type: Inner
Join condition: None

(13) Project [codegen id : 4]
Output [7]: [ss_item_sk#1, ss_quantity#3, ss_sales_price#4, d_year#8, d_moy#9, d_qoy#10, s_store_id#13]
Input [9]: [ss_item_sk#1, ss_store_sk#2, ss_quantity#3, ss_sales_price#4, d_year#8, d_moy#9, d_qoy#10, s_store_sk#11, s_store_id#13]

(14) CometNativeScan 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) CometProject
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#19, i_class#20, i_category#21, i_product_name#22], [i_item_sk#14, staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, i_brand#15, 50, true, false, true) AS i_brand#19, staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, i_class#16, 50, true, false, true) AS i_class#20, staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, i_category#17, 50, true, false, true) AS i_category#21, staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, i_product_name#18, 50, true, false, true) AS i_product_name#22]

(17) CometColumnarToRow [codegen id : 3]
Input [5]: [i_item_sk#14, i_brand#19, i_class#20, i_category#21, i_product_name#22]

(18) BroadcastExchange
Input [5]: [i_item_sk#14, i_brand#19, i_class#20, i_category#21, i_product_name#22]
Arguments: HashedRelationBroadcastMode(List(cast(input[0, int, true] as bigint)),false), [plan_id=2]

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

(20) Project [codegen id : 4]
Output [10]: [ss_quantity#3, ss_sales_price#4, d_year#8, d_moy#9, d_qoy#10, s_store_id#13, i_brand#19, i_class#20, i_category#21, i_product_name#22]
Input [12]: [ss_item_sk#1, ss_quantity#3, ss_sales_price#4, d_year#8, d_moy#9, d_qoy#10, s_store_id#13, i_item_sk#14, i_brand#19, i_class#20, i_category#21, i_product_name#22]

(21) HashAggregate [codegen id : 4]
Input [10]: [ss_quantity#3, ss_sales_price#4, d_year#8, d_moy#9, d_qoy#10, s_store_id#13, i_brand#19, i_class#20, i_category#21, i_product_name#22]
Keys [8]: [i_category#21, i_class#20, i_brand#19, i_product_name#22, d_year#8, d_qoy#10, d_moy#9, 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#23, isEmpty#24]
Results [10]: [i_category#21, i_class#20, i_brand#19, i_product_name#22, d_year#8, d_qoy#10, d_moy#9, s_store_id#13, sum#25, isEmpty#26]

(22) CometColumnarExchange
Input [10]: [i_category#21, i_class#20, i_brand#19, i_product_name#22, d_year#8, d_qoy#10, d_moy#9, s_store_id#13, sum#25, isEmpty#26]
Arguments: hashpartitioning(i_category#21, i_class#20, i_brand#19, i_product_name#22, d_year#8, d_qoy#10, d_moy#9, s_store_id#13, 5), ENSURE_REQUIREMENTS, CometColumnarShuffle, [plan_id=3]

(23) CometColumnarToRow [codegen id : 5]
Input [10]: [i_category#21, i_class#20, i_brand#19, i_product_name#22, d_year#8, d_qoy#10, d_moy#9, s_store_id#13, sum#25, isEmpty#26]

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

(25) ReusedExchange [Reuses operator id: 22]
Output [10]: [i_category#21, i_class#20, i_brand#19, i_product_name#22, d_year#37, d_qoy#38, d_moy#39, s_store_id#13, sum#40, isEmpty#41]

(26) CometColumnarToRow [codegen id : 10]
Input [10]: [i_category#21, i_class#20, i_brand#19, i_product_name#22, d_year#37, d_qoy#38, d_moy#39, s_store_id#13, sum#40, isEmpty#41]

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

(28) HashAggregate [codegen id : 10]
Input [8]: [i_category#21, i_class#20, i_brand#19, i_product_name#22, d_year#37, d_qoy#38, d_moy#39, sumsales#44]
Keys [7]: [i_category#21, i_class#20, i_brand#19, i_product_name#22, d_year#37, d_qoy#38, d_moy#39]
Functions [1]: [partial_sum(sumsales#44)]
Aggregate Attributes [2]: [sum#45, isEmpty#46]
Results [9]: [i_category#21, i_class#20, i_brand#19, i_product_name#22, d_year#37, d_qoy#38, d_moy#39, sum#47, isEmpty#48]

(29) CometColumnarExchange
Input [9]: [i_category#21, i_class#20, i_brand#19, i_product_name#22, d_year#37, d_qoy#38, d_moy#39, sum#47, isEmpty#48]
Arguments: hashpartitioning(i_category#21, i_class#20, i_brand#19, i_product_name#22, d_year#37, d_qoy#38, d_moy#39, 5), ENSURE_REQUIREMENTS, CometColumnarShuffle, [plan_id=4]

(30) CometColumnarToRow [codegen id : 11]
Input [9]: [i_category#21, i_class#20, i_brand#19, i_product_name#22, d_year#37, d_qoy#38, d_moy#39, sum#47, isEmpty#48]

(31) HashAggregate [codegen id : 11]
Input [9]: [i_category#21, i_class#20, i_brand#19, i_product_name#22, d_year#37, d_qoy#38, d_moy#39, sum#47, isEmpty#48]
Keys [7]: [i_category#21, i_class#20, i_brand#19, i_product_name#22, d_year#37, d_qoy#38, d_moy#39]
Functions [1]: [sum(sumsales#44)]
Aggregate Attributes [1]: [sum(sumsales#44)#49]
Results [9]: [i_category#21, i_class#20, i_brand#19, i_product_name#22, d_year#37, d_qoy#38, d_moy#39, null AS s_store_id#50, sum(sumsales#44)#49 AS sumsales#51]

(32) ReusedExchange [Reuses operator id: 22]
Output [10]: [i_category#21, i_class#20, i_brand#19, i_product_name#22, d_year#52, d_qoy#53, d_moy#54, s_store_id#13, sum#55, isEmpty#56]

(33) CometColumnarToRow [codegen id : 16]
Input [10]: [i_category#21, i_class#20, i_brand#19, i_product_name#22, d_year#52, d_qoy#53, d_moy#54, s_store_id#13, sum#55, isEmpty#56]

(34) HashAggregate [codegen id : 16]
Input [10]: [i_category#21, i_class#20, i_brand#19, i_product_name#22, d_year#52, d_qoy#53, d_moy#54, s_store_id#13, sum#55, isEmpty#56]
Keys [8]: [i_category#21, i_class#20, i_brand#19, i_product_name#22, d_year#52, d_qoy#53, d_moy#54, s_store_id#13]
Functions [1]: [sum(coalesce((ss_sales_price#57 * cast(ss_quantity#58 as decimal(10,0))), 0.00))]
Aggregate Attributes [1]: [sum(coalesce((ss_sales_price#57 * cast(ss_quantity#58 as decimal(10,0))), 0.00))#27]
Results [7]: [i_category#21, i_class#20, i_brand#19, i_product_name#22, d_year#52, d_qoy#53, sum(coalesce((ss_sales_price#57 * cast(ss_quantity#58 as decimal(10,0))), 0.00))#27 AS sumsales#59]

(35) HashAggregate [codegen id : 16]
Input [7]: [i_category#21, i_class#20, i_brand#19, i_product_name#22, d_year#52, d_qoy#53, sumsales#59]
Keys [6]: [i_category#21, i_class#20, i_brand#19, i_product_name#22, d_year#52, d_qoy#53]
Functions [1]: [partial_sum(sumsales#59)]
Aggregate Attributes [2]: [sum#60, isEmpty#61]
Results [8]: [i_category#21, i_class#20, i_brand#19, i_product_name#22, d_year#52, d_qoy#53, sum#62, isEmpty#63]

(36) CometColumnarExchange
Input [8]: [i_category#21, i_class#20, i_brand#19, i_product_name#22, d_year#52, d_qoy#53, sum#62, isEmpty#63]
Arguments: hashpartitioning(i_category#21, i_class#20, i_brand#19, i_product_name#22, d_year#52, d_qoy#53, 5), ENSURE_REQUIREMENTS, CometColumnarShuffle, [plan_id=5]

(37) CometColumnarToRow [codegen id : 17]
Input [8]: [i_category#21, i_class#20, i_brand#19, i_product_name#22, d_year#52, d_qoy#53, sum#62, isEmpty#63]

(38) HashAggregate [codegen id : 17]
Input [8]: [i_category#21, i_class#20, i_brand#19, i_product_name#22, d_year#52, d_qoy#53, sum#62, isEmpty#63]
Keys [6]: [i_category#21, i_class#20, i_brand#19, i_product_name#22, d_year#52, d_qoy#53]
Functions [1]: [sum(sumsales#59)]
Aggregate Attributes [1]: [sum(sumsales#59)#64]
Results [9]: [i_category#21, i_class#20, i_brand#19, i_product_name#22, d_year#52, d_qoy#53, null AS d_moy#65, null AS s_store_id#66, sum(sumsales#59)#64 AS sumsales#67]

(39) ReusedExchange [Reuses operator id: 22]
Output [10]: [i_category#21, i_class#20, i_brand#19, i_product_name#22, d_year#68, d_qoy#69, d_moy#70, s_store_id#13, sum#71, isEmpty#72]

(40) CometColumnarToRow [codegen id : 22]
Input [10]: [i_category#21, i_class#20, i_brand#19, i_product_name#22, d_year#68, d_qoy#69, d_moy#70, s_store_id#13, sum#71, isEmpty#72]

(41) HashAggregate [codegen id : 22]
Input [10]: [i_category#21, i_class#20, i_brand#19, i_product_name#22, d_year#68, d_qoy#69, d_moy#70, s_store_id#13, sum#71, isEmpty#72]
Keys [8]: [i_category#21, i_class#20, i_brand#19, i_product_name#22, d_year#68, d_qoy#69, d_moy#70, s_store_id#13]
Functions [1]: [sum(coalesce((ss_sales_price#73 * cast(ss_quantity#74 as decimal(10,0))), 0.00))]
Aggregate Attributes [1]: [sum(coalesce((ss_sales_price#73 * cast(ss_quantity#74 as decimal(10,0))), 0.00))#27]
Results [6]: [i_category#21, i_class#20, i_brand#19, i_product_name#22, d_year#68, sum(coalesce((ss_sales_price#73 * cast(ss_quantity#74 as decimal(10,0))), 0.00))#27 AS sumsales#75]

(42) HashAggregate [codegen id : 22]
Input [6]: [i_category#21, i_class#20, i_brand#19, i_product_name#22, d_year#68, sumsales#75]
Keys [5]: [i_category#21, i_class#20, i_brand#19, i_product_name#22, d_year#68]
Functions [1]: [partial_sum(sumsales#75)]
Aggregate Attributes [2]: [sum#76, isEmpty#77]
Results [7]: [i_category#21, i_class#20, i_brand#19, i_product_name#22, d_year#68, sum#78, isEmpty#79]

(43) CometColumnarExchange
Input [7]: [i_category#21, i_class#20, i_brand#19, i_product_name#22, d_year#68, sum#78, isEmpty#79]
Arguments: hashpartitioning(i_category#21, i_class#20, i_brand#19, i_product_name#22, d_year#68, 5), ENSURE_REQUIREMENTS, CometColumnarShuffle, [plan_id=6]

(44) CometColumnarToRow [codegen id : 23]
Input [7]: [i_category#21, i_class#20, i_brand#19, i_product_name#22, d_year#68, sum#78, isEmpty#79]

(45) HashAggregate [codegen id : 23]
Input [7]: [i_category#21, i_class#20, i_brand#19, i_product_name#22, d_year#68, sum#78, isEmpty#79]
Keys [5]: [i_category#21, i_class#20, i_brand#19, i_product_name#22, d_year#68]
Functions [1]: [sum(sumsales#75)]
Aggregate Attributes [1]: [sum(sumsales#75)#80]
Results [9]: [i_category#21, i_class#20, i_brand#19, i_product_name#22, d_year#68, null AS d_qoy#81, null AS d_moy#82, null AS s_store_id#83, sum(sumsales#75)#80 AS sumsales#84]

(46) ReusedExchange [Reuses operator id: 22]
Output [10]: [i_category#21, i_class#20, i_brand#19, i_product_name#22, d_year#85, d_qoy#86, d_moy#87, s_store_id#13, sum#88, isEmpty#89]

(47) CometColumnarToRow [codegen id : 28]
Input [10]: [i_category#21, i_class#20, i_brand#19, i_product_name#22, d_year#85, d_qoy#86, d_moy#87, s_store_id#13, sum#88, isEmpty#89]

(48) HashAggregate [codegen id : 28]
Input [10]: [i_category#21, i_class#20, i_brand#19, i_product_name#22, d_year#85, d_qoy#86, d_moy#87, s_store_id#13, sum#88, isEmpty#89]
Keys [8]: [i_category#21, i_class#20, i_brand#19, i_product_name#22, d_year#85, d_qoy#86, d_moy#87, s_store_id#13]
Functions [1]: [sum(coalesce((ss_sales_price#90 * cast(ss_quantity#91 as decimal(10,0))), 0.00))]
Aggregate Attributes [1]: [sum(coalesce((ss_sales_price#90 * cast(ss_quantity#91 as decimal(10,0))), 0.00))#27]
Results [5]: [i_category#21, i_class#20, i_brand#19, i_product_name#22, sum(coalesce((ss_sales_price#90 * cast(ss_quantity#91 as decimal(10,0))), 0.00))#27 AS sumsales#92]

(49) HashAggregate [codegen id : 28]
Input [5]: [i_category#21, i_class#20, i_brand#19, i_product_name#22, sumsales#92]
Keys [4]: [i_category#21, i_class#20, i_brand#19, i_product_name#22]
Functions [1]: [partial_sum(sumsales#92)]
Aggregate Attributes [2]: [sum#93, isEmpty#94]
Results [6]: [i_category#21, i_class#20, i_brand#19, i_product_name#22, sum#95, isEmpty#96]

(50) CometColumnarExchange
Input [6]: [i_category#21, i_class#20, i_brand#19, i_product_name#22, sum#95, isEmpty#96]
Arguments: hashpartitioning(i_category#21, i_class#20, i_brand#19, i_product_name#22, 5), ENSURE_REQUIREMENTS, CometColumnarShuffle, [plan_id=7]

(51) CometColumnarToRow [codegen id : 29]
Input [6]: [i_category#21, i_class#20, i_brand#19, i_product_name#22, sum#95, isEmpty#96]

(52) HashAggregate [codegen id : 29]
Input [6]: [i_category#21, i_class#20, i_brand#19, i_product_name#22, sum#95, isEmpty#96]
Keys [4]: [i_category#21, i_class#20, i_brand#19, i_product_name#22]
Functions [1]: [sum(sumsales#92)]
Aggregate Attributes [1]: [sum(sumsales#92)#97]
Results [9]: [i_category#21, i_class#20, i_brand#19, i_product_name#22, null AS d_year#98, null AS d_qoy#99, null AS d_moy#100, null AS s_store_id#101, sum(sumsales#92)#97 AS sumsales#102]

(53) ReusedExchange [Reuses operator id: 22]
Output [10]: [i_category#21, i_class#20, i_brand#19, i_product_name#22, d_year#103, d_qoy#104, d_moy#105, s_store_id#13, sum#106, isEmpty#107]

(54) CometColumnarToRow [codegen id : 34]
Input [10]: [i_category#21, i_class#20, i_brand#19, i_product_name#22, d_year#103, d_qoy#104, d_moy#105, s_store_id#13, sum#106, isEmpty#107]

(55) HashAggregate [codegen id : 34]
Input [10]: [i_category#21, i_class#20, i_brand#19, i_product_name#22, d_year#103, d_qoy#104, d_moy#105, s_store_id#13, sum#106, isEmpty#107]
Keys [8]: [i_category#21, i_class#20, i_brand#19, i_product_name#22, d_year#103, d_qoy#104, d_moy#105, s_store_id#13]
Functions [1]: [sum(coalesce((ss_sales_price#108 * cast(ss_quantity#109 as decimal(10,0))), 0.00))]
Aggregate Attributes [1]: [sum(coalesce((ss_sales_price#108 * cast(ss_quantity#109 as decimal(10,0))), 0.00))#27]
Results [4]: [i_category#21, i_class#20, i_brand#19, sum(coalesce((ss_sales_price#108 * cast(ss_quantity#109 as decimal(10,0))), 0.00))#27 AS sumsales#110]

(56) HashAggregate [codegen id : 34]
Input [4]: [i_category#21, i_class#20, i_brand#19, sumsales#110]
Keys [3]: [i_category#21, i_class#20, i_brand#19]
Functions [1]: [partial_sum(sumsales#110)]
Aggregate Attributes [2]: [sum#111, isEmpty#112]
Results [5]: [i_category#21, i_class#20, i_brand#19, sum#113, isEmpty#114]

(57) CometColumnarExchange
Input [5]: [i_category#21, i_class#20, i_brand#19, sum#113, isEmpty#114]
Arguments: hashpartitioning(i_category#21, i_class#20, i_brand#19, 5), ENSURE_REQUIREMENTS, CometColumnarShuffle, [plan_id=8]

(58) CometColumnarToRow [codegen id : 35]
Input [5]: [i_category#21, i_class#20, i_brand#19, sum#113, isEmpty#114]

(59) HashAggregate [codegen id : 35]
Input [5]: [i_category#21, i_class#20, i_brand#19, sum#113, isEmpty#114]
Keys [3]: [i_category#21, i_class#20, i_brand#19]
Functions [1]: [sum(sumsales#110)]
Aggregate Attributes [1]: [sum(sumsales#110)#115]
Results [9]: [i_category#21, i_class#20, i_brand#19, null AS i_product_name#116, null AS d_year#117, null AS d_qoy#118, null AS d_moy#119, null AS s_store_id#120, sum(sumsales#110)#115 AS sumsales#121]

(60) ReusedExchange [Reuses operator id: 22]
Output [10]: [i_category#21, i_class#20, i_brand#19, i_product_name#22, d_year#122, d_qoy#123, d_moy#124, s_store_id#13, sum#125, isEmpty#126]

(61) CometColumnarToRow [codegen id : 40]
Input [10]: [i_category#21, i_class#20, i_brand#19, i_product_name#22, d_year#122, d_qoy#123, d_moy#124, s_store_id#13, sum#125, isEmpty#126]

(62) HashAggregate [codegen id : 40]
Input [10]: [i_category#21, i_class#20, i_brand#19, i_product_name#22, d_year#122, d_qoy#123, d_moy#124, s_store_id#13, sum#125, isEmpty#126]
Keys [8]: [i_category#21, i_class#20, i_brand#19, i_product_name#22, d_year#122, d_qoy#123, d_moy#124, s_store_id#13]
Functions [1]: [sum(coalesce((ss_sales_price#127 * cast(ss_quantity#128 as decimal(10,0))), 0.00))]
Aggregate Attributes [1]: [sum(coalesce((ss_sales_price#127 * cast(ss_quantity#128 as decimal(10,0))), 0.00))#27]
Results [3]: [i_category#21, i_class#20, sum(coalesce((ss_sales_price#127 * cast(ss_quantity#128 as decimal(10,0))), 0.00))#27 AS sumsales#129]

(63) HashAggregate [codegen id : 40]
Input [3]: [i_category#21, i_class#20, sumsales#129]
Keys [2]: [i_category#21, i_class#20]
Functions [1]: [partial_sum(sumsales#129)]
Aggregate Attributes [2]: [sum#130, isEmpty#131]
Results [4]: [i_category#21, i_class#20, sum#132, isEmpty#133]

(64) CometColumnarExchange
Input [4]: [i_category#21, i_class#20, sum#132, isEmpty#133]
Arguments: hashpartitioning(i_category#21, i_class#20, 5), ENSURE_REQUIREMENTS, CometColumnarShuffle, [plan_id=9]

(65) CometColumnarToRow [codegen id : 41]
Input [4]: [i_category#21, i_class#20, sum#132, isEmpty#133]

(66) HashAggregate [codegen id : 41]
Input [4]: [i_category#21, i_class#20, sum#132, isEmpty#133]
Keys [2]: [i_category#21, i_class#20]
Functions [1]: [sum(sumsales#129)]
Aggregate Attributes [1]: [sum(sumsales#129)#134]
Results [9]: [i_category#21, i_class#20, null AS i_brand#135, null AS i_product_name#136, null AS d_year#137, null AS d_qoy#138, null AS d_moy#139, null AS s_store_id#140, sum(sumsales#129)#134 AS sumsales#141]

(67) ReusedExchange [Reuses operator id: 22]
Output [10]: [i_category#21, i_class#20, i_brand#19, i_product_name#22, d_year#142, d_qoy#143, d_moy#144, s_store_id#13, sum#145, isEmpty#146]

(68) CometColumnarToRow [codegen id : 46]
Input [10]: [i_category#21, i_class#20, i_brand#19, i_product_name#22, d_year#142, d_qoy#143, d_moy#144, s_store_id#13, sum#145, isEmpty#146]

(69) HashAggregate [codegen id : 46]
Input [10]: [i_category#21, i_class#20, i_brand#19, i_product_name#22, d_year#142, d_qoy#143, d_moy#144, s_store_id#13, sum#145, isEmpty#146]
Keys [8]: [i_category#21, i_class#20, i_brand#19, i_product_name#22, d_year#142, d_qoy#143, d_moy#144, s_store_id#13]
Functions [1]: [sum(coalesce((ss_sales_price#147 * cast(ss_quantity#148 as decimal(10,0))), 0.00))]
Aggregate Attributes [1]: [sum(coalesce((ss_sales_price#147 * cast(ss_quantity#148 as decimal(10,0))), 0.00))#27]
Results [2]: [i_category#21, sum(coalesce((ss_sales_price#147 * cast(ss_quantity#148 as decimal(10,0))), 0.00))#27 AS sumsales#149]

(70) HashAggregate [codegen id : 46]
Input [2]: [i_category#21, sumsales#149]
Keys [1]: [i_category#21]
Functions [1]: [partial_sum(sumsales#149)]
Aggregate Attributes [2]: [sum#150, isEmpty#151]
Results [3]: [i_category#21, sum#152, isEmpty#153]

(71) CometColumnarExchange
Input [3]: [i_category#21, sum#152, isEmpty#153]
Arguments: hashpartitioning(i_category#21, 5), ENSURE_REQUIREMENTS, CometColumnarShuffle, [plan_id=10]

(72) CometColumnarToRow [codegen id : 47]
Input [3]: [i_category#21, sum#152, isEmpty#153]

(73) HashAggregate [codegen id : 47]
Input [3]: [i_category#21, sum#152, isEmpty#153]
Keys [1]: [i_category#21]
Functions [1]: [sum(sumsales#149)]
Aggregate Attributes [1]: [sum(sumsales#149)#154]
Results [9]: [i_category#21, null AS i_class#155, null AS i_brand#156, null AS i_product_name#157, null AS d_year#158, null AS d_qoy#159, null AS d_moy#160, null AS s_store_id#161, sum(sumsales#149)#154 AS sumsales#162]

(74) ReusedExchange [Reuses operator id: 22]
Output [10]: [i_category#21, i_class#20, i_brand#19, i_product_name#22, d_year#163, d_qoy#164, d_moy#165, s_store_id#13, sum#166, isEmpty#167]

(75) CometColumnarToRow [codegen id : 52]
Input [10]: [i_category#21, i_class#20, i_brand#19, i_product_name#22, d_year#163, d_qoy#164, d_moy#165, s_store_id#13, sum#166, isEmpty#167]

(76) HashAggregate [codegen id : 52]
Input [10]: [i_category#21, i_class#20, i_brand#19, i_product_name#22, d_year#163, d_qoy#164, d_moy#165, s_store_id#13, sum#166, isEmpty#167]
Keys [8]: [i_category#21, i_class#20, i_brand#19, i_product_name#22, d_year#163, d_qoy#164, d_moy#165, s_store_id#13]
Functions [1]: [sum(coalesce((ss_sales_price#168 * cast(ss_quantity#169 as decimal(10,0))), 0.00))]
Aggregate Attributes [1]: [sum(coalesce((ss_sales_price#168 * cast(ss_quantity#169 as decimal(10,0))), 0.00))#27]
Results [1]: [sum(coalesce((ss_sales_price#168 * cast(ss_quantity#169 as decimal(10,0))), 0.00))#27 AS sumsales#170]

(77) HashAggregate [codegen id : 52]
Input [1]: [sumsales#170]
Keys: []
Functions [1]: [partial_sum(sumsales#170)]
Aggregate Attributes [2]: [sum#171, isEmpty#172]
Results [2]: [sum#173, isEmpty#174]

(78) CometColumnarExchange
Input [2]: [sum#173, isEmpty#174]
Arguments: SinglePartition, ENSURE_REQUIREMENTS, CometColumnarShuffle, [plan_id=11]

(79) CometColumnarToRow [codegen id : 53]
Input [2]: [sum#173, isEmpty#174]

(80) HashAggregate [codegen id : 53]
Input [2]: [sum#173, isEmpty#174]
Keys: []
Functions [1]: [sum(sumsales#170)]
Aggregate Attributes [1]: [sum(sumsales#170)#175]
Results [9]: [null AS i_category#176, null AS i_class#177, null AS i_brand#178, null AS i_product_name#179, null AS d_year#180, null AS d_qoy#181, null AS d_moy#182, null AS s_store_id#183, sum(sumsales#170)#175 AS sumsales#184]

(81) Union

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

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

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

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

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

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

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

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

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

===== Subqueries =====

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


(91) CometNativeScan parquet spark_catalog.default.date_dim
Output [5]: [d_date_sk#7, d_month_seq#186, d_year#8, d_moy#9, d_qoy#10]
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>

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

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

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

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


