== Physical Plan ==
* Sort (42)
+- Exchange (41)
   +- * HashAggregate (40)
      +- Exchange (39)
         +- * HashAggregate (38)
            +- * Project (37)
               +- * BroadcastHashJoin Inner BuildRight (36)
                  :- * Project (30)
                  :  +- * BroadcastHashJoin Inner BuildLeft (29)
                  :     :- BroadcastExchange (5)
                  :     :  +- * Project (4)
                  :     :     +- * Filter (3)
                  :     :        +- * ColumnarToRow (2)
                  :     :           +- Scan parquet spark_catalog.default.item (1)
                  :     +- Union (28)
                  :        :- * Project (15)
                  :        :  +- * BroadcastHashJoin Inner BuildRight (14)
                  :        :     :- * Filter (8)
                  :        :     :  +- * ColumnarToRow (7)
                  :        :     :     +- Scan parquet spark_catalog.default.web_sales (6)
                  :        :     +- BroadcastExchange (13)
                  :        :        +- * Project (12)
                  :        :           +- * Filter (11)
                  :        :              +- * ColumnarToRow (10)
                  :        :                 +- Scan parquet spark_catalog.default.date_dim (9)
                  :        :- * Project (21)
                  :        :  +- * BroadcastHashJoin Inner BuildRight (20)
                  :        :     :- * Filter (18)
                  :        :     :  +- * ColumnarToRow (17)
                  :        :     :     +- Scan parquet spark_catalog.default.catalog_sales (16)
                  :        :     +- ReusedExchange (19)
                  :        +- * Project (27)
                  :           +- * BroadcastHashJoin Inner BuildRight (26)
                  :              :- * Filter (24)
                  :              :  +- * ColumnarToRow (23)
                  :              :     +- Scan parquet spark_catalog.default.store_sales (22)
                  :              +- ReusedExchange (25)
                  +- BroadcastExchange (35)
                     +- * Project (34)
                        +- * Filter (33)
                           +- * ColumnarToRow (32)
                              +- Scan parquet spark_catalog.default.time_dim (31)


(1) Scan parquet spark_catalog.default.item
Output [4]: [i_item_sk#1, i_brand_id#2, i_brand#3, i_manager_id#4]
Batched: true
Location [not included in comparison]/{warehouse_dir}/item]
PushedFilters: [IsNotNull(i_manager_id), EqualTo(i_manager_id,1), IsNotNull(i_item_sk)]
ReadSchema: struct<i_item_sk:int,i_brand_id:int,i_brand:string,i_manager_id:int>

(2) ColumnarToRow [codegen id : 1]
Input [4]: [i_item_sk#1, i_brand_id#2, i_brand#3, i_manager_id#4]

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

(4) Project [codegen id : 1]
Output [3]: [i_item_sk#1, i_brand_id#2, i_brand#3]
Input [4]: [i_item_sk#1, i_brand_id#2, i_brand#3, i_manager_id#4]

(5) BroadcastExchange
Input [3]: [i_item_sk#1, i_brand_id#2, i_brand#3]
Arguments: HashedRelationBroadcastMode(List(cast(input[0, int, true] as bigint)),false), [plan_id=1]

(6) Scan parquet 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]
Batched: true
Location: InMemoryFileIndex []
PartitionFilters: [isnotnull(ws_sold_date_sk#8)]
PushedFilters: [IsNotNull(ws_item_sk), IsNotNull(ws_sold_time_sk)]
ReadSchema: struct<ws_sold_time_sk:int,ws_item_sk:int,ws_ext_sales_price:decimal(7,2)>

(7) ColumnarToRow [codegen id : 3]
Input [4]: [ws_sold_time_sk#5, ws_item_sk#6, ws_ext_sales_price#7, ws_sold_date_sk#8]

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

(9) Scan parquet spark_catalog.default.date_dim
Output [3]: [d_date_sk#9, d_year#10, d_moy#11]
Batched: true
Location [not included in comparison]/{warehouse_dir}/date_dim]
PushedFilters: [IsNotNull(d_moy), IsNotNull(d_year), EqualTo(d_moy,11), EqualTo(d_year,1999), IsNotNull(d_date_sk)]
ReadSchema: struct<d_date_sk:int,d_year:int,d_moy:int>

(10) ColumnarToRow [codegen id : 2]
Input [3]: [d_date_sk#9, d_year#10, d_moy#11]

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

(12) Project [codegen id : 2]
Output [1]: [d_date_sk#9]
Input [3]: [d_date_sk#9, d_year#10, d_moy#11]

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

(14) BroadcastHashJoin [codegen id : 3]
Left keys [1]: [ws_sold_date_sk#8]
Right keys [1]: [d_date_sk#9]
Join type: Inner
Join condition: None

(15) Project [codegen id : 3]
Output [3]: [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]
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]

(16) Scan parquet 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]
Batched: true
Location: InMemoryFileIndex []
PartitionFilters: [isnotnull(cs_sold_date_sk#18)]
PushedFilters: [IsNotNull(cs_item_sk), IsNotNull(cs_sold_time_sk)]
ReadSchema: struct<cs_sold_time_sk:int,cs_item_sk:int,cs_ext_sales_price:decimal(7,2)>

(17) ColumnarToRow [codegen id : 5]
Input [4]: [cs_sold_time_sk#15, cs_item_sk#16, cs_ext_sales_price#17, cs_sold_date_sk#18]

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

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

(20) BroadcastHashJoin [codegen id : 5]
Left keys [1]: [cs_sold_date_sk#18]
Right keys [1]: [d_date_sk#19]
Join type: Inner
Join condition: None

(21) Project [codegen id : 5]
Output [3]: [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]
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]

(22) Scan parquet 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]
Batched: true
Location: InMemoryFileIndex []
PartitionFilters: [isnotnull(ss_sold_date_sk#26)]
PushedFilters: [IsNotNull(ss_item_sk), IsNotNull(ss_sold_time_sk)]
ReadSchema: struct<ss_sold_time_sk:int,ss_item_sk:int,ss_ext_sales_price:decimal(7,2)>

(23) ColumnarToRow [codegen id : 7]
Input [4]: [ss_sold_time_sk#23, ss_item_sk#24, ss_ext_sales_price#25, ss_sold_date_sk#26]

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

(25) ReusedExchange [Reuses operator id: 13]
Output [1]: [d_date_sk#27]

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

(27) Project [codegen id : 7]
Output [3]: [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]
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]

(28) Union

(29) BroadcastHashJoin [codegen id : 9]
Left keys [1]: [i_item_sk#1]
Right keys [1]: [sold_item_sk#13]
Join type: Inner
Join condition: None

(30) Project [codegen id : 9]
Output [4]: [i_brand_id#2, i_brand#3, ext_price#12, time_sk#14]
Input [6]: [i_item_sk#1, i_brand_id#2, i_brand#3, ext_price#12, sold_item_sk#13, time_sk#14]

(31) Scan parquet spark_catalog.default.time_dim
Output [4]: [t_time_sk#31, t_hour#32, t_minute#33, t_meal_time#34]
Batched: true
Location [not included in comparison]/{warehouse_dir}/time_dim]
PushedFilters: [Or(EqualTo(t_meal_time,breakfast           ),EqualTo(t_meal_time,dinner              )), IsNotNull(t_time_sk)]
ReadSchema: struct<t_time_sk:int,t_hour:int,t_minute:int,t_meal_time:string>

(32) ColumnarToRow [codegen id : 8]
Input [4]: [t_time_sk#31, t_hour#32, t_minute#33, t_meal_time#34]

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

(34) Project [codegen id : 8]
Output [3]: [t_time_sk#31, t_hour#32, t_minute#33]
Input [4]: [t_time_sk#31, t_hour#32, t_minute#33, t_meal_time#34]

(35) BroadcastExchange
Input [3]: [t_time_sk#31, t_hour#32, t_minute#33]
Arguments: HashedRelationBroadcastMode(List(cast(input[0, int, true] as bigint)),false), [plan_id=3]

(36) BroadcastHashJoin [codegen id : 9]
Left keys [1]: [time_sk#14]
Right keys [1]: [t_time_sk#31]
Join type: Inner
Join condition: None

(37) Project [codegen id : 9]
Output [5]: [i_brand_id#2, i_brand#3, ext_price#12, t_hour#32, t_minute#33]
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]

(38) HashAggregate [codegen id : 9]
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]

(39) 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=4]

(40) HashAggregate [codegen id : 10]
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]

(41) Exchange
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, [plan_id=5]

(42) Sort [codegen id : 11]
Input [5]: [brand_id#38, brand#39, t_hour#32, t_minute#33, ext_price#40]
Arguments: [ext_price#40 DESC NULLS LAST, brand_id#38 ASC NULLS FIRST], true, 0

