== Physical Plan ==
TakeOrderedAndProject (87)
+- * Filter (86)
   +- Window (85)
      +- * CometColumnarToRow (84)
         +- CometSort (83)
            +- CometColumnarExchange (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: 92]
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#44]

(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#44]
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#44)]
Aggregate Attributes [2]: [sum#59, isEmpty#60]
Results [8]: [i_category#21, i_class#20, i_brand#19, i_product_name#22, d_year#52, d_qoy#53, sum#61, isEmpty#62]

(36) CometColumnarExchange
Input [8]: [i_category#21, i_class#20, i_brand#19, i_product_name#22, d_year#52, d_qoy#53, sum#61, isEmpty#62]
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#61, isEmpty#62]

(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#61, isEmpty#62]
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#44)]
Aggregate Attributes [1]: [sum(sumsales#44)#63]
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#64, null AS s_store_id#65, sum(sumsales#44)#63 AS sumsales#66]

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

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

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

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

(43) CometColumnarExchange
Input [7]: [i_category#21, i_class#20, i_brand#19, i_product_name#22, d_year#67, sum#76, isEmpty#77]
Arguments: hashpartitioning(i_category#21, i_class#20, i_brand#19, i_product_name#22, d_year#67, 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#67, sum#76, isEmpty#77]

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

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

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

(48) HashAggregate [codegen id : 28]
Input [10]: [i_category#21, i_class#20, i_brand#19, i_product_name#22, d_year#83, d_qoy#84, d_moy#85, s_store_id#13, sum#86, isEmpty#87]
Keys [8]: [i_category#21, i_class#20, i_brand#19, i_product_name#22, d_year#83, d_qoy#84, d_moy#85, s_store_id#13]
Functions [1]: [sum(coalesce((ss_sales_price#88 * cast(ss_quantity#89 as decimal(10,0))), 0.00))]
Aggregate Attributes [1]: [sum(coalesce((ss_sales_price#88 * cast(ss_quantity#89 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#88 * cast(ss_quantity#89 as decimal(10,0))), 0.00))#27 AS sumsales#44]

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

(50) CometColumnarExchange
Input [6]: [i_category#21, i_class#20, i_brand#19, i_product_name#22, sum#92, isEmpty#93]
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#92, isEmpty#93]

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

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

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

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

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

(57) CometColumnarExchange
Input [5]: [i_category#21, i_class#20, i_brand#19, sum#109, isEmpty#110]
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#109, isEmpty#110]

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

(60) ReusedExchange [Reuses operator id: 22]
Output [10]: [i_category#21, i_class#20, i_brand#19, i_product_name#22, d_year#118, d_qoy#119, d_moy#120, s_store_id#13, sum#121, isEmpty#122]

(61) CometColumnarToRow [codegen id : 40]
Input [10]: [i_category#21, i_class#20, i_brand#19, i_product_name#22, d_year#118, d_qoy#119, d_moy#120, s_store_id#13, sum#121, isEmpty#122]

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

(63) HashAggregate [codegen id : 40]
Input [3]: [i_category#21, i_class#20, sumsales#44]
Keys [2]: [i_category#21, i_class#20]
Functions [1]: [partial_sum(sumsales#44)]
Aggregate Attributes [2]: [sum#125, isEmpty#126]
Results [4]: [i_category#21, i_class#20, sum#127, isEmpty#128]

(64) CometColumnarExchange
Input [4]: [i_category#21, i_class#20, sum#127, isEmpty#128]
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#127, isEmpty#128]

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

(67) ReusedExchange [Reuses operator id: 22]
Output [10]: [i_category#21, i_class#20, i_brand#19, i_product_name#22, d_year#137, d_qoy#138, d_moy#139, s_store_id#13, sum#140, isEmpty#141]

(68) CometColumnarToRow [codegen id : 46]
Input [10]: [i_category#21, i_class#20, i_brand#19, i_product_name#22, d_year#137, d_qoy#138, d_moy#139, s_store_id#13, sum#140, isEmpty#141]

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

(70) HashAggregate [codegen id : 46]
Input [2]: [i_category#21, sumsales#44]
Keys [1]: [i_category#21]
Functions [1]: [partial_sum(sumsales#44)]
Aggregate Attributes [2]: [sum#144, isEmpty#145]
Results [3]: [i_category#21, sum#146, isEmpty#147]

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

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

(73) HashAggregate [codegen id : 47]
Input [3]: [i_category#21, sum#146, isEmpty#147]
Keys [1]: [i_category#21]
Functions [1]: [sum(sumsales#44)]
Aggregate Attributes [1]: [sum(sumsales#44)#148]
Results [9]: [i_category#21, null AS i_class#149, null AS i_brand#150, null AS i_product_name#151, null AS d_year#152, null AS d_qoy#153, null AS d_moy#154, null AS s_store_id#155, sum(sumsales#44)#148 AS sumsales#156]

(74) ReusedExchange [Reuses operator id: 22]
Output [10]: [i_category#21, i_class#20, i_brand#19, i_product_name#22, d_year#157, d_qoy#158, d_moy#159, s_store_id#13, sum#160, isEmpty#161]

(75) CometColumnarToRow [codegen id : 52]
Input [10]: [i_category#21, i_class#20, i_brand#19, i_product_name#22, d_year#157, d_qoy#158, d_moy#159, s_store_id#13, sum#160, isEmpty#161]

(76) HashAggregate [codegen id : 52]
Input [10]: [i_category#21, i_class#20, i_brand#19, i_product_name#22, d_year#157, d_qoy#158, d_moy#159, s_store_id#13, sum#160, isEmpty#161]
Keys [8]: [i_category#21, i_class#20, i_brand#19, i_product_name#22, d_year#157, d_qoy#158, d_moy#159, s_store_id#13]
Functions [1]: [sum(coalesce((ss_sales_price#162 * cast(ss_quantity#163 as decimal(10,0))), 0.00))]
Aggregate Attributes [1]: [sum(coalesce((ss_sales_price#162 * cast(ss_quantity#163 as decimal(10,0))), 0.00))#27]
Results [1]: [sum(coalesce((ss_sales_price#162 * cast(ss_quantity#163 as decimal(10,0))), 0.00))#27 AS sumsales#44]

(77) HashAggregate [codegen id : 52]
Input [1]: [sumsales#44]
Keys: []
Functions [1]: [partial_sum(sumsales#44)]
Aggregate Attributes [2]: [sum#164, isEmpty#165]
Results [2]: [sum#166, isEmpty#167]

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

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

(80) HashAggregate [codegen id : 53]
Input [2]: [sum#166, isEmpty#167]
Keys: []
Functions [1]: [sum(sumsales#44)]
Aggregate Attributes [1]: [sum(sumsales#44)#168]
Results [9]: [null AS i_category#169, null AS i_class#170, null AS i_brand#171, null AS i_product_name#172, null AS d_year#173, null AS d_qoy#174, null AS d_moy#175, null AS s_store_id#176, sum(sumsales#44)#168 AS sumsales#177]

(81) Union

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

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

(84) CometColumnarToRow [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]

(85) 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#178], [i_category#28], [sumsales#36 DESC NULLS LAST]

(86) Filter [codegen id : 55]
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#178]
Condition : (rk#178 <= 100)

(87) 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#178]
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#178 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#178]

===== Subqueries =====

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


(88) CometNativeScan parquet spark_catalog.default.date_dim
Output [5]: [d_date_sk#7, d_month_seq#179, 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>

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

(90) CometProject
Input [5]: [d_date_sk#7, d_month_seq#179, 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]

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

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


