== Physical Plan ==
* ColumnarToRow (38)
+- CometSort (37)
   +- CometColumnarExchange (36)
      +- * HashAggregate (35)
         +- Exchange (34)
            +- * HashAggregate (33)
               +- * ColumnarToRow (32)
                  +- CometProject (31)
                     +- CometBroadcastHashJoin (30)
                        :- CometProject (25)
                        :  +- CometBroadcastHashJoin (24)
                        :     :- CometBroadcastExchange (4)
                        :     :  +- CometProject (3)
                        :     :     +- CometFilter (2)
                        :     :        +- CometNativeScan: `spark_catalog`.`default`.`item` (1)
                        :     +- CometUnion (23)
                        :        :- CometProject (12)
                        :        :  +- CometBroadcastHashJoin (11)
                        :        :     :- CometFilter (6)
                        :        :     :  +- CometNativeScan: `spark_catalog`.`default`.`web_sales` (5)
                        :        :     +- CometBroadcastExchange (10)
                        :        :        +- CometProject (9)
                        :        :           +- CometFilter (8)
                        :        :              +- CometNativeScan: `spark_catalog`.`default`.`date_dim` (7)
                        :        :- CometProject (17)
                        :        :  +- CometBroadcastHashJoin (16)
                        :        :     :- CometFilter (14)
                        :        :     :  +- CometNativeScan: `spark_catalog`.`default`.`catalog_sales` (13)
                        :        :     +- ReusedExchange (15)
                        :        +- CometProject (22)
                        :           +- CometBroadcastHashJoin (21)
                        :              :- CometFilter (19)
                        :              :  +- CometNativeScan: `spark_catalog`.`default`.`store_sales` (18)
                        :              +- ReusedExchange (20)
                        +- CometBroadcastExchange (29)
                           +- CometProject (28)
                              +- CometFilter (27)
                                 +- CometNativeScan: `spark_catalog`.`default`.`time_dim` (26)


(1) CometNativeScan: `spark_catalog`.`default`.`item`
Output [4]: [i_item_sk#1, i_brand_id#2, i_brand#3, i_manager_id#4]
Arguments: [i_item_sk#1, i_brand_id#2, i_brand#3, i_manager_id#4]

(2) CometFilter
Input [4]: [i_item_sk#1, i_brand_id#2, i_brand#3, i_manager_id#4]
Condition : ((isnotnull(i_manager_id#4) AND (i_manager_id#4 = 1)) AND isnotnull(i_item_sk#1))

(3) CometProject
Input [4]: [i_item_sk#1, i_brand_id#2, i_brand#3, i_manager_id#4]
Arguments: [i_item_sk#1, i_brand_id#2, i_brand#3], [i_item_sk#1, i_brand_id#2, i_brand#3]

(4) CometBroadcastExchange
Input [3]: [i_item_sk#1, i_brand_id#2, i_brand#3]
Arguments: [i_item_sk#1, i_brand_id#2, i_brand#3]

(5) CometNativeScan: `spark_catalog`.`default`.`web_sales`
Output [4]: [ws_sold_time_sk#5, ws_item_sk#6, ws_ext_sales_price#7, ws_sold_date_sk#8]
Arguments: [ws_sold_time_sk#5, ws_item_sk#6, ws_ext_sales_price#7, ws_sold_date_sk#8]

(6) CometFilter
Input [4]: [ws_sold_time_sk#5, ws_item_sk#6, ws_ext_sales_price#7, ws_sold_date_sk#8]
Condition : (isnotnull(ws_item_sk#6) AND isnotnull(ws_sold_time_sk#5))

(7) CometNativeScan: `spark_catalog`.`default`.`date_dim`
Output [3]: [d_date_sk#9, d_year#10, d_moy#11]
Arguments: [d_date_sk#9, d_year#10, d_moy#11]

(8) CometFilter
Input [3]: [d_date_sk#9, d_year#10, d_moy#11]
Condition : ((((isnotnull(d_moy#11) AND isnotnull(d_year#10)) AND (d_moy#11 = 11)) AND (d_year#10 = 1999)) AND isnotnull(d_date_sk#9))

(9) CometProject
Input [3]: [d_date_sk#9, d_year#10, d_moy#11]
Arguments: [d_date_sk#9], [d_date_sk#9]

(10) CometBroadcastExchange
Input [1]: [d_date_sk#9]
Arguments: [d_date_sk#9]

(11) CometBroadcastHashJoin
Left output [4]: [ws_sold_time_sk#5, ws_item_sk#6, ws_ext_sales_price#7, ws_sold_date_sk#8]
Right output [1]: [d_date_sk#9]
Arguments: [ws_sold_date_sk#8], [d_date_sk#9], Inner, BuildRight

(12) CometProject
Input [5]: [ws_sold_time_sk#5, ws_item_sk#6, ws_ext_sales_price#7, ws_sold_date_sk#8, d_date_sk#9]
Arguments: [ext_price#12, sold_item_sk#13, time_sk#14], [ws_ext_sales_price#7 AS ext_price#12, ws_item_sk#6 AS sold_item_sk#13, ws_sold_time_sk#5 AS time_sk#14]

(13) CometNativeScan: `spark_catalog`.`default`.`catalog_sales`
Output [4]: [cs_sold_time_sk#15, cs_item_sk#16, cs_ext_sales_price#17, cs_sold_date_sk#18]
Arguments: [cs_sold_time_sk#15, cs_item_sk#16, cs_ext_sales_price#17, cs_sold_date_sk#18]

(14) CometFilter
Input [4]: [cs_sold_time_sk#15, cs_item_sk#16, cs_ext_sales_price#17, cs_sold_date_sk#18]
Condition : (isnotnull(cs_item_sk#16) AND isnotnull(cs_sold_time_sk#15))

(15) ReusedExchange [Reuses operator id: 10]
Output [1]: [d_date_sk#19]

(16) CometBroadcastHashJoin
Left output [4]: [cs_sold_time_sk#15, cs_item_sk#16, cs_ext_sales_price#17, cs_sold_date_sk#18]
Right output [1]: [d_date_sk#19]
Arguments: [cs_sold_date_sk#18], [d_date_sk#19], Inner, BuildRight

(17) CometProject
Input [5]: [cs_sold_time_sk#15, cs_item_sk#16, cs_ext_sales_price#17, cs_sold_date_sk#18, d_date_sk#19]
Arguments: [ext_price#20, sold_item_sk#21, time_sk#22], [cs_ext_sales_price#17 AS ext_price#20, cs_item_sk#16 AS sold_item_sk#21, cs_sold_time_sk#15 AS time_sk#22]

(18) CometNativeScan: `spark_catalog`.`default`.`store_sales`
Output [4]: [ss_sold_time_sk#23, ss_item_sk#24, ss_ext_sales_price#25, ss_sold_date_sk#26]
Arguments: [ss_sold_time_sk#23, ss_item_sk#24, ss_ext_sales_price#25, ss_sold_date_sk#26]

(19) CometFilter
Input [4]: [ss_sold_time_sk#23, ss_item_sk#24, ss_ext_sales_price#25, ss_sold_date_sk#26]
Condition : (isnotnull(ss_item_sk#24) AND isnotnull(ss_sold_time_sk#23))

(20) ReusedExchange [Reuses operator id: 10]
Output [1]: [d_date_sk#27]

(21) CometBroadcastHashJoin
Left output [4]: [ss_sold_time_sk#23, ss_item_sk#24, ss_ext_sales_price#25, ss_sold_date_sk#26]
Right output [1]: [d_date_sk#27]
Arguments: [ss_sold_date_sk#26], [d_date_sk#27], Inner, BuildRight

(22) CometProject
Input [5]: [ss_sold_time_sk#23, ss_item_sk#24, ss_ext_sales_price#25, ss_sold_date_sk#26, d_date_sk#27]
Arguments: [ext_price#28, sold_item_sk#29, time_sk#30], [ss_ext_sales_price#25 AS ext_price#28, ss_item_sk#24 AS sold_item_sk#29, ss_sold_time_sk#23 AS time_sk#30]

(23) CometUnion
Child 0 Input [3]: [ext_price#12, sold_item_sk#13, time_sk#14]
Child 1 Input [3]: [ext_price#20, sold_item_sk#21, time_sk#22]
Child 2 Input [3]: [ext_price#28, sold_item_sk#29, time_sk#30]

(24) CometBroadcastHashJoin
Left output [3]: [i_item_sk#1, i_brand_id#2, i_brand#3]
Right output [3]: [ext_price#12, sold_item_sk#13, time_sk#14]
Arguments: [i_item_sk#1], [sold_item_sk#13], Inner, BuildLeft

(25) CometProject
Input [6]: [i_item_sk#1, i_brand_id#2, i_brand#3, ext_price#12, sold_item_sk#13, time_sk#14]
Arguments: [i_brand_id#2, i_brand#3, ext_price#12, time_sk#14], [i_brand_id#2, i_brand#3, ext_price#12, time_sk#14]

(26) CometNativeScan: `spark_catalog`.`default`.`time_dim`
Output [4]: [t_time_sk#31, t_hour#32, t_minute#33, t_meal_time#34]
Arguments: [t_time_sk#31, t_hour#32, t_minute#33, t_meal_time#34]

(27) CometFilter
Input [4]: [t_time_sk#31, t_hour#32, t_minute#33, t_meal_time#34]
Condition : (((t_meal_time#34 = breakfast           ) OR (t_meal_time#34 = dinner              )) AND isnotnull(t_time_sk#31))

(28) CometProject
Input [4]: [t_time_sk#31, t_hour#32, t_minute#33, t_meal_time#34]
Arguments: [t_time_sk#31, t_hour#32, t_minute#33], [t_time_sk#31, t_hour#32, t_minute#33]

(29) CometBroadcastExchange
Input [3]: [t_time_sk#31, t_hour#32, t_minute#33]
Arguments: [t_time_sk#31, t_hour#32, t_minute#33]

(30) CometBroadcastHashJoin
Left output [4]: [i_brand_id#2, i_brand#3, ext_price#12, time_sk#14]
Right output [3]: [t_time_sk#31, t_hour#32, t_minute#33]
Arguments: [time_sk#14], [t_time_sk#31], Inner, BuildRight

(31) CometProject
Input [7]: [i_brand_id#2, i_brand#3, ext_price#12, time_sk#14, t_time_sk#31, t_hour#32, t_minute#33]
Arguments: [i_brand_id#2, i_brand#3, ext_price#12, t_hour#32, t_minute#33], [i_brand_id#2, i_brand#3, ext_price#12, t_hour#32, t_minute#33]

(32) ColumnarToRow [codegen id : 1]
Input [5]: [i_brand_id#2, i_brand#3, ext_price#12, t_hour#32, t_minute#33]

(33) HashAggregate [codegen id : 1]
Input [5]: [i_brand_id#2, i_brand#3, ext_price#12, t_hour#32, t_minute#33]
Keys [4]: [i_brand#3, i_brand_id#2, t_hour#32, t_minute#33]
Functions [1]: [partial_sum(UnscaledValue(ext_price#12))]
Aggregate Attributes [1]: [sum#35]
Results [5]: [i_brand#3, i_brand_id#2, t_hour#32, t_minute#33, sum#36]

(34) Exchange
Input [5]: [i_brand#3, i_brand_id#2, t_hour#32, t_minute#33, sum#36]
Arguments: hashpartitioning(i_brand#3, i_brand_id#2, t_hour#32, t_minute#33, 5), ENSURE_REQUIREMENTS, [plan_id=1]

(35) HashAggregate [codegen id : 2]
Input [5]: [i_brand#3, i_brand_id#2, t_hour#32, t_minute#33, sum#36]
Keys [4]: [i_brand#3, i_brand_id#2, t_hour#32, t_minute#33]
Functions [1]: [sum(UnscaledValue(ext_price#12))]
Aggregate Attributes [1]: [sum(UnscaledValue(ext_price#12))#37]
Results [5]: [i_brand_id#2 AS brand_id#38, i_brand#3 AS brand#39, t_hour#32, t_minute#33, MakeDecimal(sum(UnscaledValue(ext_price#12))#37,17,2) AS ext_price#40]

(36) CometColumnarExchange
Input [5]: [brand_id#38, brand#39, t_hour#32, t_minute#33, ext_price#40]
Arguments: rangepartitioning(ext_price#40 DESC NULLS LAST, brand_id#38 ASC NULLS FIRST, 5), ENSURE_REQUIREMENTS, CometColumnarShuffle, [plan_id=2]

(37) CometSort
Input [5]: [brand_id#38, brand#39, t_hour#32, t_minute#33, ext_price#40]
Arguments: [brand_id#38, brand#39, t_hour#32, t_minute#33, ext_price#40], [ext_price#40 DESC NULLS LAST, brand_id#38 ASC NULLS FIRST]

(38) ColumnarToRow [codegen id : 3]
Input [5]: [brand_id#38, brand#39, t_hour#32, t_minute#33, ext_price#40]

