== Physical Plan ==
TakeOrderedAndProject (125)
+- * HashAggregate (124)
   +- Exchange (123)
      +- * HashAggregate (122)
         +- Union (121)
            :- * HashAggregate (100)
            :  +- Exchange (99)
            :     +- * HashAggregate (98)
            :        +- Union (97)
            :           :- * Filter (66)
            :           :  +- * HashAggregate (65)
            :           :     +- Exchange (64)
            :           :        +- * HashAggregate (63)
            :           :           +- * Project (62)
            :           :              +- * BroadcastHashJoin Inner BuildRight (61)
            :           :                 :- * Project (59)
            :           :                 :  +- * BroadcastHashJoin Inner BuildRight (58)
            :           :                 :     :- * BroadcastHashJoin LeftSemi BuildRight (51)
            :           :                 :     :  :- * Filter (3)
            :           :                 :     :  :  +- * ColumnarToRow (2)
            :           :                 :     :  :     +- Scan parquet spark_catalog.default.store_sales (1)
            :           :                 :     :  +- BroadcastExchange (50)
            :           :                 :     :     +- * Project (49)
            :           :                 :     :        +- * BroadcastHashJoin Inner BuildRight (48)
            :           :                 :     :           :- * Filter (6)
            :           :                 :     :           :  +- * ColumnarToRow (5)
            :           :                 :     :           :     +- Scan parquet spark_catalog.default.item (4)
            :           :                 :     :           +- BroadcastExchange (47)
            :           :                 :     :              +- * BroadcastHashJoin LeftSemi BuildRight (46)
            :           :                 :     :                 :- * HashAggregate (35)
            :           :                 :     :                 :  +- Exchange (34)
            :           :                 :     :                 :     +- * HashAggregate (33)
            :           :                 :     :                 :        +- * Project (32)
            :           :                 :     :                 :           +- * BroadcastHashJoin Inner BuildRight (31)
            :           :                 :     :                 :              :- * Project (29)
            :           :                 :     :                 :              :  +- * BroadcastHashJoin Inner BuildRight (28)
            :           :                 :     :                 :              :     :- * Filter (9)
            :           :                 :     :                 :              :     :  +- * ColumnarToRow (8)
            :           :                 :     :                 :              :     :     +- Scan parquet spark_catalog.default.store_sales (7)
            :           :                 :     :                 :              :     +- BroadcastExchange (27)
            :           :                 :     :                 :              :        +- * BroadcastHashJoin LeftSemi BuildRight (26)
            :           :                 :     :                 :              :           :- * Filter (12)
            :           :                 :     :                 :              :           :  +- * ColumnarToRow (11)
            :           :                 :     :                 :              :           :     +- Scan parquet spark_catalog.default.item (10)
            :           :                 :     :                 :              :           +- BroadcastExchange (25)
            :           :                 :     :                 :              :              +- * Project (24)
            :           :                 :     :                 :              :                 +- * BroadcastHashJoin Inner BuildRight (23)
            :           :                 :     :                 :              :                    :- * Project (21)
            :           :                 :     :                 :              :                    :  +- * BroadcastHashJoin Inner BuildRight (20)
            :           :                 :     :                 :              :                    :     :- * Filter (15)
            :           :                 :     :                 :              :                    :     :  +- * ColumnarToRow (14)
            :           :                 :     :                 :              :                    :     :     +- Scan parquet spark_catalog.default.catalog_sales (13)
            :           :                 :     :                 :              :                    :     +- BroadcastExchange (19)
            :           :                 :     :                 :              :                    :        +- * Filter (18)
            :           :                 :     :                 :              :                    :           +- * ColumnarToRow (17)
            :           :                 :     :                 :              :                    :              +- Scan parquet spark_catalog.default.item (16)
            :           :                 :     :                 :              :                    +- ReusedExchange (22)
            :           :                 :     :                 :              +- ReusedExchange (30)
            :           :                 :     :                 +- BroadcastExchange (45)
            :           :                 :     :                    +- * Project (44)
            :           :                 :     :                       +- * BroadcastHashJoin Inner BuildRight (43)
            :           :                 :     :                          :- * Project (41)
            :           :                 :     :                          :  +- * BroadcastHashJoin Inner BuildRight (40)
            :           :                 :     :                          :     :- * Filter (38)
            :           :                 :     :                          :     :  +- * ColumnarToRow (37)
            :           :                 :     :                          :     :     +- Scan parquet spark_catalog.default.web_sales (36)
            :           :                 :     :                          :     +- ReusedExchange (39)
            :           :                 :     :                          +- ReusedExchange (42)
            :           :                 :     +- BroadcastExchange (57)
            :           :                 :        +- * BroadcastHashJoin LeftSemi BuildRight (56)
            :           :                 :           :- * Filter (54)
            :           :                 :           :  +- * ColumnarToRow (53)
            :           :                 :           :     +- Scan parquet spark_catalog.default.item (52)
            :           :                 :           +- ReusedExchange (55)
            :           :                 +- ReusedExchange (60)
            :           :- * Filter (81)
            :           :  +- * HashAggregate (80)
            :           :     +- Exchange (79)
            :           :        +- * HashAggregate (78)
            :           :           +- * Project (77)
            :           :              +- * BroadcastHashJoin Inner BuildRight (76)
            :           :                 :- * Project (74)
            :           :                 :  +- * BroadcastHashJoin Inner BuildRight (73)
            :           :                 :     :- * BroadcastHashJoin LeftSemi BuildRight (71)
            :           :                 :     :  :- * Filter (69)
            :           :                 :     :  :  +- * ColumnarToRow (68)
            :           :                 :     :  :     +- Scan parquet spark_catalog.default.catalog_sales (67)
            :           :                 :     :  +- ReusedExchange (70)
            :           :                 :     +- ReusedExchange (72)
            :           :                 +- ReusedExchange (75)
            :           +- * Filter (96)
            :              +- * HashAggregate (95)
            :                 +- Exchange (94)
            :                    +- * HashAggregate (93)
            :                       +- * Project (92)
            :                          +- * BroadcastHashJoin Inner BuildRight (91)
            :                             :- * Project (89)
            :                             :  +- * BroadcastHashJoin Inner BuildRight (88)
            :                             :     :- * BroadcastHashJoin LeftSemi BuildRight (86)
            :                             :     :  :- * Filter (84)
            :                             :     :  :  +- * ColumnarToRow (83)
            :                             :     :  :     +- Scan parquet spark_catalog.default.web_sales (82)
            :                             :     :  +- ReusedExchange (85)
            :                             :     +- ReusedExchange (87)
            :                             +- ReusedExchange (90)
            :- * HashAggregate (105)
            :  +- Exchange (104)
            :     +- * HashAggregate (103)
            :        +- * HashAggregate (102)
            :           +- ReusedExchange (101)
            :- * HashAggregate (110)
            :  +- Exchange (109)
            :     +- * HashAggregate (108)
            :        +- * HashAggregate (107)
            :           +- ReusedExchange (106)
            :- * HashAggregate (115)
            :  +- Exchange (114)
            :     +- * HashAggregate (113)
            :        +- * HashAggregate (112)
            :           +- ReusedExchange (111)
            +- * HashAggregate (120)
               +- Exchange (119)
                  +- * HashAggregate (118)
                     +- * HashAggregate (117)
                        +- ReusedExchange (116)


(1) Scan parquet spark_catalog.default.store_sales
Output [4]: [ss_item_sk#1, ss_quantity#2, ss_list_price#3, ss_sold_date_sk#4]
Batched: true
Location: InMemoryFileIndex []
PartitionFilters: [isnotnull(ss_sold_date_sk#4), dynamicpruningexpression(ss_sold_date_sk#4 IN dynamicpruning#5)]
PushedFilters: [IsNotNull(ss_item_sk)]
ReadSchema: struct<ss_item_sk:int,ss_quantity:int,ss_list_price:decimal(7,2)>

(2) ColumnarToRow [codegen id : 25]
Input [4]: [ss_item_sk#1, ss_quantity#2, ss_list_price#3, ss_sold_date_sk#4]

(3) Filter [codegen id : 25]
Input [4]: [ss_item_sk#1, ss_quantity#2, ss_list_price#3, ss_sold_date_sk#4]
Condition : isnotnull(ss_item_sk#1)

(4) Scan parquet spark_catalog.default.item
Output [4]: [i_item_sk#6, i_brand_id#7, i_class_id#8, i_category_id#9]
Batched: true
Location [not included in comparison]/{warehouse_dir}/item]
PushedFilters: [IsNotNull(i_brand_id), IsNotNull(i_class_id), IsNotNull(i_category_id)]
ReadSchema: struct<i_item_sk:int,i_brand_id:int,i_class_id:int,i_category_id:int>

(5) ColumnarToRow [codegen id : 11]
Input [4]: [i_item_sk#6, i_brand_id#7, i_class_id#8, i_category_id#9]

(6) Filter [codegen id : 11]
Input [4]: [i_item_sk#6, i_brand_id#7, i_class_id#8, i_category_id#9]
Condition : ((isnotnull(i_brand_id#7) AND isnotnull(i_class_id#8)) AND isnotnull(i_category_id#9))

(7) Scan parquet spark_catalog.default.store_sales
Output [2]: [ss_item_sk#10, ss_sold_date_sk#11]
Batched: true
Location: InMemoryFileIndex []
PartitionFilters: [isnotnull(ss_sold_date_sk#11), dynamicpruningexpression(ss_sold_date_sk#11 IN dynamicpruning#12)]
PushedFilters: [IsNotNull(ss_item_sk)]
ReadSchema: struct<ss_item_sk:int>

(8) ColumnarToRow [codegen id : 6]
Input [2]: [ss_item_sk#10, ss_sold_date_sk#11]

(9) Filter [codegen id : 6]
Input [2]: [ss_item_sk#10, ss_sold_date_sk#11]
Condition : isnotnull(ss_item_sk#10)

(10) Scan parquet spark_catalog.default.item
Output [4]: [i_item_sk#13, i_brand_id#14, i_class_id#15, i_category_id#16]
Batched: true
Location [not included in comparison]/{warehouse_dir}/item]
PushedFilters: [IsNotNull(i_item_sk), IsNotNull(i_brand_id), IsNotNull(i_class_id), IsNotNull(i_category_id)]
ReadSchema: struct<i_item_sk:int,i_brand_id:int,i_class_id:int,i_category_id:int>

(11) ColumnarToRow [codegen id : 4]
Input [4]: [i_item_sk#13, i_brand_id#14, i_class_id#15, i_category_id#16]

(12) Filter [codegen id : 4]
Input [4]: [i_item_sk#13, i_brand_id#14, i_class_id#15, i_category_id#16]
Condition : (((isnotnull(i_item_sk#13) AND isnotnull(i_brand_id#14)) AND isnotnull(i_class_id#15)) AND isnotnull(i_category_id#16))

(13) Scan parquet spark_catalog.default.catalog_sales
Output [2]: [cs_item_sk#17, cs_sold_date_sk#18]
Batched: true
Location: InMemoryFileIndex []
PartitionFilters: [isnotnull(cs_sold_date_sk#18), dynamicpruningexpression(cs_sold_date_sk#18 IN dynamicpruning#12)]
PushedFilters: [IsNotNull(cs_item_sk)]
ReadSchema: struct<cs_item_sk:int>

(14) ColumnarToRow [codegen id : 3]
Input [2]: [cs_item_sk#17, cs_sold_date_sk#18]

(15) Filter [codegen id : 3]
Input [2]: [cs_item_sk#17, cs_sold_date_sk#18]
Condition : isnotnull(cs_item_sk#17)

(16) Scan parquet spark_catalog.default.item
Output [4]: [i_item_sk#19, i_brand_id#20, i_class_id#21, i_category_id#22]
Batched: true
Location [not included in comparison]/{warehouse_dir}/item]
PushedFilters: [IsNotNull(i_item_sk)]
ReadSchema: struct<i_item_sk:int,i_brand_id:int,i_class_id:int,i_category_id:int>

(17) ColumnarToRow [codegen id : 1]
Input [4]: [i_item_sk#19, i_brand_id#20, i_class_id#21, i_category_id#22]

(18) Filter [codegen id : 1]
Input [4]: [i_item_sk#19, i_brand_id#20, i_class_id#21, i_category_id#22]
Condition : isnotnull(i_item_sk#19)

(19) BroadcastExchange
Input [4]: [i_item_sk#19, i_brand_id#20, i_class_id#21, i_category_id#22]
Arguments: HashedRelationBroadcastMode(List(cast(input[0, int, false] as bigint)),false), [plan_id=1]

(20) BroadcastHashJoin [codegen id : 3]
Left keys [1]: [cs_item_sk#17]
Right keys [1]: [i_item_sk#19]
Join type: Inner
Join condition: None

(21) Project [codegen id : 3]
Output [4]: [cs_sold_date_sk#18, i_brand_id#20, i_class_id#21, i_category_id#22]
Input [6]: [cs_item_sk#17, cs_sold_date_sk#18, i_item_sk#19, i_brand_id#20, i_class_id#21, i_category_id#22]

(22) ReusedExchange [Reuses operator id: 159]
Output [1]: [d_date_sk#23]

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

(24) Project [codegen id : 3]
Output [3]: [i_brand_id#20, i_class_id#21, i_category_id#22]
Input [5]: [cs_sold_date_sk#18, i_brand_id#20, i_class_id#21, i_category_id#22, d_date_sk#23]

(25) BroadcastExchange
Input [3]: [i_brand_id#20, i_class_id#21, i_category_id#22]
Arguments: HashedRelationBroadcastMode(List(coalesce(input[0, int, true], 0), isnull(input[0, int, true]), coalesce(input[1, int, true], 0), isnull(input[1, int, true]), coalesce(input[2, int, true], 0), isnull(input[2, int, true])),false), [plan_id=2]

(26) BroadcastHashJoin [codegen id : 4]
Left keys [6]: [coalesce(i_brand_id#14, 0), isnull(i_brand_id#14), coalesce(i_class_id#15, 0), isnull(i_class_id#15), coalesce(i_category_id#16, 0), isnull(i_category_id#16)]
Right keys [6]: [coalesce(i_brand_id#20, 0), isnull(i_brand_id#20), coalesce(i_class_id#21, 0), isnull(i_class_id#21), coalesce(i_category_id#22, 0), isnull(i_category_id#22)]
Join type: LeftSemi
Join condition: None

(27) BroadcastExchange
Input [4]: [i_item_sk#13, i_brand_id#14, i_class_id#15, i_category_id#16]
Arguments: HashedRelationBroadcastMode(List(cast(input[0, int, false] as bigint)),false), [plan_id=3]

(28) BroadcastHashJoin [codegen id : 6]
Left keys [1]: [ss_item_sk#10]
Right keys [1]: [i_item_sk#13]
Join type: Inner
Join condition: None

(29) Project [codegen id : 6]
Output [4]: [ss_sold_date_sk#11, i_brand_id#14, i_class_id#15, i_category_id#16]
Input [6]: [ss_item_sk#10, ss_sold_date_sk#11, i_item_sk#13, i_brand_id#14, i_class_id#15, i_category_id#16]

(30) ReusedExchange [Reuses operator id: 159]
Output [1]: [d_date_sk#24]

(31) BroadcastHashJoin [codegen id : 6]
Left keys [1]: [ss_sold_date_sk#11]
Right keys [1]: [d_date_sk#24]
Join type: Inner
Join condition: None

(32) Project [codegen id : 6]
Output [3]: [i_brand_id#14 AS brand_id#25, i_class_id#15 AS class_id#26, i_category_id#16 AS category_id#27]
Input [5]: [ss_sold_date_sk#11, i_brand_id#14, i_class_id#15, i_category_id#16, d_date_sk#24]

(33) HashAggregate [codegen id : 6]
Input [3]: [brand_id#25, class_id#26, category_id#27]
Keys [3]: [brand_id#25, class_id#26, category_id#27]
Functions: []
Aggregate Attributes: []
Results [3]: [brand_id#25, class_id#26, category_id#27]

(34) Exchange
Input [3]: [brand_id#25, class_id#26, category_id#27]
Arguments: hashpartitioning(brand_id#25, class_id#26, category_id#27, 5), ENSURE_REQUIREMENTS, [plan_id=4]

(35) HashAggregate [codegen id : 10]
Input [3]: [brand_id#25, class_id#26, category_id#27]
Keys [3]: [brand_id#25, class_id#26, category_id#27]
Functions: []
Aggregate Attributes: []
Results [3]: [brand_id#25, class_id#26, category_id#27]

(36) Scan parquet spark_catalog.default.web_sales
Output [2]: [ws_item_sk#28, ws_sold_date_sk#29]
Batched: true
Location: InMemoryFileIndex []
PartitionFilters: [isnotnull(ws_sold_date_sk#29), dynamicpruningexpression(ws_sold_date_sk#29 IN dynamicpruning#12)]
PushedFilters: [IsNotNull(ws_item_sk)]
ReadSchema: struct<ws_item_sk:int>

(37) ColumnarToRow [codegen id : 9]
Input [2]: [ws_item_sk#28, ws_sold_date_sk#29]

(38) Filter [codegen id : 9]
Input [2]: [ws_item_sk#28, ws_sold_date_sk#29]
Condition : isnotnull(ws_item_sk#28)

(39) ReusedExchange [Reuses operator id: 19]
Output [4]: [i_item_sk#30, i_brand_id#31, i_class_id#32, i_category_id#33]

(40) BroadcastHashJoin [codegen id : 9]
Left keys [1]: [ws_item_sk#28]
Right keys [1]: [i_item_sk#30]
Join type: Inner
Join condition: None

(41) Project [codegen id : 9]
Output [4]: [ws_sold_date_sk#29, i_brand_id#31, i_class_id#32, i_category_id#33]
Input [6]: [ws_item_sk#28, ws_sold_date_sk#29, i_item_sk#30, i_brand_id#31, i_class_id#32, i_category_id#33]

(42) ReusedExchange [Reuses operator id: 159]
Output [1]: [d_date_sk#34]

(43) BroadcastHashJoin [codegen id : 9]
Left keys [1]: [ws_sold_date_sk#29]
Right keys [1]: [d_date_sk#34]
Join type: Inner
Join condition: None

(44) Project [codegen id : 9]
Output [3]: [i_brand_id#31, i_class_id#32, i_category_id#33]
Input [5]: [ws_sold_date_sk#29, i_brand_id#31, i_class_id#32, i_category_id#33, d_date_sk#34]

(45) BroadcastExchange
Input [3]: [i_brand_id#31, i_class_id#32, i_category_id#33]
Arguments: HashedRelationBroadcastMode(List(coalesce(input[0, int, true], 0), isnull(input[0, int, true]), coalesce(input[1, int, true], 0), isnull(input[1, int, true]), coalesce(input[2, int, true], 0), isnull(input[2, int, true])),false), [plan_id=5]

(46) BroadcastHashJoin [codegen id : 10]
Left keys [6]: [coalesce(brand_id#25, 0), isnull(brand_id#25), coalesce(class_id#26, 0), isnull(class_id#26), coalesce(category_id#27, 0), isnull(category_id#27)]
Right keys [6]: [coalesce(i_brand_id#31, 0), isnull(i_brand_id#31), coalesce(i_class_id#32, 0), isnull(i_class_id#32), coalesce(i_category_id#33, 0), isnull(i_category_id#33)]
Join type: LeftSemi
Join condition: None

(47) BroadcastExchange
Input [3]: [brand_id#25, class_id#26, category_id#27]
Arguments: HashedRelationBroadcastMode(List(input[0, int, true], input[1, int, true], input[2, int, true]),false), [plan_id=6]

(48) BroadcastHashJoin [codegen id : 11]
Left keys [3]: [i_brand_id#7, i_class_id#8, i_category_id#9]
Right keys [3]: [brand_id#25, class_id#26, category_id#27]
Join type: Inner
Join condition: None

(49) Project [codegen id : 11]
Output [1]: [i_item_sk#6 AS ss_item_sk#35]
Input [7]: [i_item_sk#6, i_brand_id#7, i_class_id#8, i_category_id#9, brand_id#25, class_id#26, category_id#27]

(50) BroadcastExchange
Input [1]: [ss_item_sk#35]
Arguments: HashedRelationBroadcastMode(List(cast(input[0, int, true] as bigint)),false), [plan_id=7]

(51) BroadcastHashJoin [codegen id : 25]
Left keys [1]: [ss_item_sk#1]
Right keys [1]: [ss_item_sk#35]
Join type: LeftSemi
Join condition: None

(52) Scan parquet spark_catalog.default.item
Output [4]: [i_item_sk#36, i_brand_id#37, i_class_id#38, i_category_id#39]
Batched: true
Location [not included in comparison]/{warehouse_dir}/item]
PushedFilters: [IsNotNull(i_item_sk)]
ReadSchema: struct<i_item_sk:int,i_brand_id:int,i_class_id:int,i_category_id:int>

(53) ColumnarToRow [codegen id : 23]
Input [4]: [i_item_sk#36, i_brand_id#37, i_class_id#38, i_category_id#39]

(54) Filter [codegen id : 23]
Input [4]: [i_item_sk#36, i_brand_id#37, i_class_id#38, i_category_id#39]
Condition : isnotnull(i_item_sk#36)

(55) ReusedExchange [Reuses operator id: 50]
Output [1]: [ss_item_sk#35]

(56) BroadcastHashJoin [codegen id : 23]
Left keys [1]: [i_item_sk#36]
Right keys [1]: [ss_item_sk#35]
Join type: LeftSemi
Join condition: None

(57) BroadcastExchange
Input [4]: [i_item_sk#36, i_brand_id#37, i_class_id#38, i_category_id#39]
Arguments: HashedRelationBroadcastMode(List(cast(input[0, int, false] as bigint)),false), [plan_id=8]

(58) BroadcastHashJoin [codegen id : 25]
Left keys [1]: [ss_item_sk#1]
Right keys [1]: [i_item_sk#36]
Join type: Inner
Join condition: None

(59) Project [codegen id : 25]
Output [6]: [ss_quantity#2, ss_list_price#3, ss_sold_date_sk#4, i_brand_id#37, i_class_id#38, i_category_id#39]
Input [8]: [ss_item_sk#1, ss_quantity#2, ss_list_price#3, ss_sold_date_sk#4, i_item_sk#36, i_brand_id#37, i_class_id#38, i_category_id#39]

(60) ReusedExchange [Reuses operator id: 154]
Output [1]: [d_date_sk#40]

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

(62) Project [codegen id : 25]
Output [5]: [ss_quantity#2, ss_list_price#3, i_brand_id#37, i_class_id#38, i_category_id#39]
Input [7]: [ss_quantity#2, ss_list_price#3, ss_sold_date_sk#4, i_brand_id#37, i_class_id#38, i_category_id#39, d_date_sk#40]

(63) HashAggregate [codegen id : 25]
Input [5]: [ss_quantity#2, ss_list_price#3, i_brand_id#37, i_class_id#38, i_category_id#39]
Keys [3]: [i_brand_id#37, i_class_id#38, i_category_id#39]
Functions [2]: [partial_sum((cast(ss_quantity#2 as decimal(10,0)) * ss_list_price#3)), partial_count(1)]
Aggregate Attributes [3]: [sum#41, isEmpty#42, count#43]
Results [6]: [i_brand_id#37, i_class_id#38, i_category_id#39, sum#44, isEmpty#45, count#46]

(64) Exchange
Input [6]: [i_brand_id#37, i_class_id#38, i_category_id#39, sum#44, isEmpty#45, count#46]
Arguments: hashpartitioning(i_brand_id#37, i_class_id#38, i_category_id#39, 5), ENSURE_REQUIREMENTS, [plan_id=9]

(65) HashAggregate [codegen id : 26]
Input [6]: [i_brand_id#37, i_class_id#38, i_category_id#39, sum#44, isEmpty#45, count#46]
Keys [3]: [i_brand_id#37, i_class_id#38, i_category_id#39]
Functions [2]: [sum((cast(ss_quantity#2 as decimal(10,0)) * ss_list_price#3)), count(1)]
Aggregate Attributes [2]: [sum((cast(ss_quantity#2 as decimal(10,0)) * ss_list_price#3))#47, count(1)#48]
Results [6]: [store AS channel#49, i_brand_id#37, i_class_id#38, i_category_id#39, sum((cast(ss_quantity#2 as decimal(10,0)) * ss_list_price#3))#47 AS sales#50, count(1)#48 AS number_sales#51]

(66) Filter [codegen id : 26]
Input [6]: [channel#49, i_brand_id#37, i_class_id#38, i_category_id#39, sales#50, number_sales#51]
Condition : (isnotnull(sales#50) AND (cast(sales#50 as decimal(32,6)) > cast(Subquery scalar-subquery#52, [id=#53] as decimal(32,6))))

(67) Scan parquet spark_catalog.default.catalog_sales
Output [4]: [cs_item_sk#54, cs_quantity#55, cs_list_price#56, cs_sold_date_sk#57]
Batched: true
Location: InMemoryFileIndex []
PartitionFilters: [isnotnull(cs_sold_date_sk#57), dynamicpruningexpression(cs_sold_date_sk#57 IN dynamicpruning#5)]
PushedFilters: [IsNotNull(cs_item_sk)]
ReadSchema: struct<cs_item_sk:int,cs_quantity:int,cs_list_price:decimal(7,2)>

(68) ColumnarToRow [codegen id : 51]
Input [4]: [cs_item_sk#54, cs_quantity#55, cs_list_price#56, cs_sold_date_sk#57]

(69) Filter [codegen id : 51]
Input [4]: [cs_item_sk#54, cs_quantity#55, cs_list_price#56, cs_sold_date_sk#57]
Condition : isnotnull(cs_item_sk#54)

(70) ReusedExchange [Reuses operator id: 50]
Output [1]: [ss_item_sk#58]

(71) BroadcastHashJoin [codegen id : 51]
Left keys [1]: [cs_item_sk#54]
Right keys [1]: [ss_item_sk#58]
Join type: LeftSemi
Join condition: None

(72) ReusedExchange [Reuses operator id: 57]
Output [4]: [i_item_sk#59, i_brand_id#60, i_class_id#61, i_category_id#62]

(73) BroadcastHashJoin [codegen id : 51]
Left keys [1]: [cs_item_sk#54]
Right keys [1]: [i_item_sk#59]
Join type: Inner
Join condition: None

(74) Project [codegen id : 51]
Output [6]: [cs_quantity#55, cs_list_price#56, cs_sold_date_sk#57, i_brand_id#60, i_class_id#61, i_category_id#62]
Input [8]: [cs_item_sk#54, cs_quantity#55, cs_list_price#56, cs_sold_date_sk#57, i_item_sk#59, i_brand_id#60, i_class_id#61, i_category_id#62]

(75) ReusedExchange [Reuses operator id: 154]
Output [1]: [d_date_sk#63]

(76) BroadcastHashJoin [codegen id : 51]
Left keys [1]: [cs_sold_date_sk#57]
Right keys [1]: [d_date_sk#63]
Join type: Inner
Join condition: None

(77) Project [codegen id : 51]
Output [5]: [cs_quantity#55, cs_list_price#56, i_brand_id#60, i_class_id#61, i_category_id#62]
Input [7]: [cs_quantity#55, cs_list_price#56, cs_sold_date_sk#57, i_brand_id#60, i_class_id#61, i_category_id#62, d_date_sk#63]

(78) HashAggregate [codegen id : 51]
Input [5]: [cs_quantity#55, cs_list_price#56, i_brand_id#60, i_class_id#61, i_category_id#62]
Keys [3]: [i_brand_id#60, i_class_id#61, i_category_id#62]
Functions [2]: [partial_sum((cast(cs_quantity#55 as decimal(10,0)) * cs_list_price#56)), partial_count(1)]
Aggregate Attributes [3]: [sum#64, isEmpty#65, count#66]
Results [6]: [i_brand_id#60, i_class_id#61, i_category_id#62, sum#67, isEmpty#68, count#69]

(79) Exchange
Input [6]: [i_brand_id#60, i_class_id#61, i_category_id#62, sum#67, isEmpty#68, count#69]
Arguments: hashpartitioning(i_brand_id#60, i_class_id#61, i_category_id#62, 5), ENSURE_REQUIREMENTS, [plan_id=10]

(80) HashAggregate [codegen id : 52]
Input [6]: [i_brand_id#60, i_class_id#61, i_category_id#62, sum#67, isEmpty#68, count#69]
Keys [3]: [i_brand_id#60, i_class_id#61, i_category_id#62]
Functions [2]: [sum((cast(cs_quantity#55 as decimal(10,0)) * cs_list_price#56)), count(1)]
Aggregate Attributes [2]: [sum((cast(cs_quantity#55 as decimal(10,0)) * cs_list_price#56))#70, count(1)#71]
Results [6]: [catalog AS channel#72, i_brand_id#60, i_class_id#61, i_category_id#62, sum((cast(cs_quantity#55 as decimal(10,0)) * cs_list_price#56))#70 AS sales#73, count(1)#71 AS number_sales#74]

(81) Filter [codegen id : 52]
Input [6]: [channel#72, i_brand_id#60, i_class_id#61, i_category_id#62, sales#73, number_sales#74]
Condition : (isnotnull(sales#73) AND (cast(sales#73 as decimal(32,6)) > cast(ReusedSubquery Subquery scalar-subquery#52, [id=#53] as decimal(32,6))))

(82) Scan parquet spark_catalog.default.web_sales
Output [4]: [ws_item_sk#75, ws_quantity#76, ws_list_price#77, ws_sold_date_sk#78]
Batched: true
Location: InMemoryFileIndex []
PartitionFilters: [isnotnull(ws_sold_date_sk#78), dynamicpruningexpression(ws_sold_date_sk#78 IN dynamicpruning#5)]
PushedFilters: [IsNotNull(ws_item_sk)]
ReadSchema: struct<ws_item_sk:int,ws_quantity:int,ws_list_price:decimal(7,2)>

(83) ColumnarToRow [codegen id : 77]
Input [4]: [ws_item_sk#75, ws_quantity#76, ws_list_price#77, ws_sold_date_sk#78]

(84) Filter [codegen id : 77]
Input [4]: [ws_item_sk#75, ws_quantity#76, ws_list_price#77, ws_sold_date_sk#78]
Condition : isnotnull(ws_item_sk#75)

(85) ReusedExchange [Reuses operator id: 50]
Output [1]: [ss_item_sk#79]

(86) BroadcastHashJoin [codegen id : 77]
Left keys [1]: [ws_item_sk#75]
Right keys [1]: [ss_item_sk#79]
Join type: LeftSemi
Join condition: None

(87) ReusedExchange [Reuses operator id: 57]
Output [4]: [i_item_sk#80, i_brand_id#81, i_class_id#82, i_category_id#83]

(88) BroadcastHashJoin [codegen id : 77]
Left keys [1]: [ws_item_sk#75]
Right keys [1]: [i_item_sk#80]
Join type: Inner
Join condition: None

(89) Project [codegen id : 77]
Output [6]: [ws_quantity#76, ws_list_price#77, ws_sold_date_sk#78, i_brand_id#81, i_class_id#82, i_category_id#83]
Input [8]: [ws_item_sk#75, ws_quantity#76, ws_list_price#77, ws_sold_date_sk#78, i_item_sk#80, i_brand_id#81, i_class_id#82, i_category_id#83]

(90) ReusedExchange [Reuses operator id: 154]
Output [1]: [d_date_sk#84]

(91) BroadcastHashJoin [codegen id : 77]
Left keys [1]: [ws_sold_date_sk#78]
Right keys [1]: [d_date_sk#84]
Join type: Inner
Join condition: None

(92) Project [codegen id : 77]
Output [5]: [ws_quantity#76, ws_list_price#77, i_brand_id#81, i_class_id#82, i_category_id#83]
Input [7]: [ws_quantity#76, ws_list_price#77, ws_sold_date_sk#78, i_brand_id#81, i_class_id#82, i_category_id#83, d_date_sk#84]

(93) HashAggregate [codegen id : 77]
Input [5]: [ws_quantity#76, ws_list_price#77, i_brand_id#81, i_class_id#82, i_category_id#83]
Keys [3]: [i_brand_id#81, i_class_id#82, i_category_id#83]
Functions [2]: [partial_sum((cast(ws_quantity#76 as decimal(10,0)) * ws_list_price#77)), partial_count(1)]
Aggregate Attributes [3]: [sum#85, isEmpty#86, count#87]
Results [6]: [i_brand_id#81, i_class_id#82, i_category_id#83, sum#88, isEmpty#89, count#90]

(94) Exchange
Input [6]: [i_brand_id#81, i_class_id#82, i_category_id#83, sum#88, isEmpty#89, count#90]
Arguments: hashpartitioning(i_brand_id#81, i_class_id#82, i_category_id#83, 5), ENSURE_REQUIREMENTS, [plan_id=11]

(95) HashAggregate [codegen id : 78]
Input [6]: [i_brand_id#81, i_class_id#82, i_category_id#83, sum#88, isEmpty#89, count#90]
Keys [3]: [i_brand_id#81, i_class_id#82, i_category_id#83]
Functions [2]: [sum((cast(ws_quantity#76 as decimal(10,0)) * ws_list_price#77)), count(1)]
Aggregate Attributes [2]: [sum((cast(ws_quantity#76 as decimal(10,0)) * ws_list_price#77))#91, count(1)#92]
Results [6]: [web AS channel#93, i_brand_id#81, i_class_id#82, i_category_id#83, sum((cast(ws_quantity#76 as decimal(10,0)) * ws_list_price#77))#91 AS sales#94, count(1)#92 AS number_sales#95]

(96) Filter [codegen id : 78]
Input [6]: [channel#93, i_brand_id#81, i_class_id#82, i_category_id#83, sales#94, number_sales#95]
Condition : (isnotnull(sales#94) AND (cast(sales#94 as decimal(32,6)) > cast(ReusedSubquery Subquery scalar-subquery#52, [id=#53] as decimal(32,6))))

(97) Union

(98) HashAggregate [codegen id : 79]
Input [6]: [channel#49, i_brand_id#37, i_class_id#38, i_category_id#39, sales#50, number_sales#51]
Keys [4]: [channel#49, i_brand_id#37, i_class_id#38, i_category_id#39]
Functions [2]: [partial_sum(sales#50), partial_sum(number_sales#51)]
Aggregate Attributes [3]: [sum#96, isEmpty#97, sum#98]
Results [7]: [channel#49, i_brand_id#37, i_class_id#38, i_category_id#39, sum#99, isEmpty#100, sum#101]

(99) Exchange
Input [7]: [channel#49, i_brand_id#37, i_class_id#38, i_category_id#39, sum#99, isEmpty#100, sum#101]
Arguments: hashpartitioning(channel#49, i_brand_id#37, i_class_id#38, i_category_id#39, 5), ENSURE_REQUIREMENTS, [plan_id=12]

(100) HashAggregate [codegen id : 80]
Input [7]: [channel#49, i_brand_id#37, i_class_id#38, i_category_id#39, sum#99, isEmpty#100, sum#101]
Keys [4]: [channel#49, i_brand_id#37, i_class_id#38, i_category_id#39]
Functions [2]: [sum(sales#50), sum(number_sales#51)]
Aggregate Attributes [2]: [sum(sales#50)#102, sum(number_sales#51)#103]
Results [6]: [channel#49, i_brand_id#37, i_class_id#38, i_category_id#39, sum(sales#50)#102 AS sum_sales#104, sum(number_sales#51)#103 AS number_sales#105]

(101) ReusedExchange [Reuses operator id: 99]
Output [7]: [channel#106, i_brand_id#107, i_class_id#108, i_category_id#109, sum#110, isEmpty#111, sum#112]

(102) HashAggregate [codegen id : 160]
Input [7]: [channel#106, i_brand_id#107, i_class_id#108, i_category_id#109, sum#110, isEmpty#111, sum#112]
Keys [4]: [channel#106, i_brand_id#107, i_class_id#108, i_category_id#109]
Functions [2]: [sum(sales#113), sum(number_sales#114)]
Aggregate Attributes [2]: [sum(sales#113)#102, sum(number_sales#114)#103]
Results [5]: [channel#106, i_brand_id#107, i_class_id#108, sum(sales#113)#102 AS sum_sales#115, sum(number_sales#114)#103 AS number_sales#116]

(103) HashAggregate [codegen id : 160]
Input [5]: [channel#106, i_brand_id#107, i_class_id#108, sum_sales#115, number_sales#116]
Keys [3]: [channel#106, i_brand_id#107, i_class_id#108]
Functions [2]: [partial_sum(sum_sales#115), partial_sum(number_sales#116)]
Aggregate Attributes [3]: [sum#117, isEmpty#118, sum#119]
Results [6]: [channel#106, i_brand_id#107, i_class_id#108, sum#120, isEmpty#121, sum#122]

(104) Exchange
Input [6]: [channel#106, i_brand_id#107, i_class_id#108, sum#120, isEmpty#121, sum#122]
Arguments: hashpartitioning(channel#106, i_brand_id#107, i_class_id#108, 5), ENSURE_REQUIREMENTS, [plan_id=13]

(105) HashAggregate [codegen id : 161]
Input [6]: [channel#106, i_brand_id#107, i_class_id#108, sum#120, isEmpty#121, sum#122]
Keys [3]: [channel#106, i_brand_id#107, i_class_id#108]
Functions [2]: [sum(sum_sales#115), sum(number_sales#116)]
Aggregate Attributes [2]: [sum(sum_sales#115)#123, sum(number_sales#116)#124]
Results [6]: [channel#106, i_brand_id#107, i_class_id#108, null AS i_category_id#125, sum(sum_sales#115)#123 AS sum(sum_sales)#126, sum(number_sales#116)#124 AS sum(number_sales)#127]

(106) ReusedExchange [Reuses operator id: 99]
Output [7]: [channel#128, i_brand_id#129, i_class_id#130, i_category_id#131, sum#132, isEmpty#133, sum#134]

(107) HashAggregate [codegen id : 241]
Input [7]: [channel#128, i_brand_id#129, i_class_id#130, i_category_id#131, sum#132, isEmpty#133, sum#134]
Keys [4]: [channel#128, i_brand_id#129, i_class_id#130, i_category_id#131]
Functions [2]: [sum(sales#135), sum(number_sales#136)]
Aggregate Attributes [2]: [sum(sales#135)#102, sum(number_sales#136)#103]
Results [4]: [channel#128, i_brand_id#129, sum(sales#135)#102 AS sum_sales#137, sum(number_sales#136)#103 AS number_sales#138]

(108) HashAggregate [codegen id : 241]
Input [4]: [channel#128, i_brand_id#129, sum_sales#137, number_sales#138]
Keys [2]: [channel#128, i_brand_id#129]
Functions [2]: [partial_sum(sum_sales#137), partial_sum(number_sales#138)]
Aggregate Attributes [3]: [sum#139, isEmpty#140, sum#141]
Results [5]: [channel#128, i_brand_id#129, sum#142, isEmpty#143, sum#144]

(109) Exchange
Input [5]: [channel#128, i_brand_id#129, sum#142, isEmpty#143, sum#144]
Arguments: hashpartitioning(channel#128, i_brand_id#129, 5), ENSURE_REQUIREMENTS, [plan_id=14]

(110) HashAggregate [codegen id : 242]
Input [5]: [channel#128, i_brand_id#129, sum#142, isEmpty#143, sum#144]
Keys [2]: [channel#128, i_brand_id#129]
Functions [2]: [sum(sum_sales#137), sum(number_sales#138)]
Aggregate Attributes [2]: [sum(sum_sales#137)#145, sum(number_sales#138)#146]
Results [6]: [channel#128, i_brand_id#129, null AS i_class_id#147, null AS i_category_id#148, sum(sum_sales#137)#145 AS sum(sum_sales)#149, sum(number_sales#138)#146 AS sum(number_sales)#150]

(111) ReusedExchange [Reuses operator id: 99]
Output [7]: [channel#151, i_brand_id#152, i_class_id#153, i_category_id#154, sum#155, isEmpty#156, sum#157]

(112) HashAggregate [codegen id : 322]
Input [7]: [channel#151, i_brand_id#152, i_class_id#153, i_category_id#154, sum#155, isEmpty#156, sum#157]
Keys [4]: [channel#151, i_brand_id#152, i_class_id#153, i_category_id#154]
Functions [2]: [sum(sales#158), sum(number_sales#159)]
Aggregate Attributes [2]: [sum(sales#158)#102, sum(number_sales#159)#103]
Results [3]: [channel#151, sum(sales#158)#102 AS sum_sales#160, sum(number_sales#159)#103 AS number_sales#161]

(113) HashAggregate [codegen id : 322]
Input [3]: [channel#151, sum_sales#160, number_sales#161]
Keys [1]: [channel#151]
Functions [2]: [partial_sum(sum_sales#160), partial_sum(number_sales#161)]
Aggregate Attributes [3]: [sum#162, isEmpty#163, sum#164]
Results [4]: [channel#151, sum#165, isEmpty#166, sum#167]

(114) Exchange
Input [4]: [channel#151, sum#165, isEmpty#166, sum#167]
Arguments: hashpartitioning(channel#151, 5), ENSURE_REQUIREMENTS, [plan_id=15]

(115) HashAggregate [codegen id : 323]
Input [4]: [channel#151, sum#165, isEmpty#166, sum#167]
Keys [1]: [channel#151]
Functions [2]: [sum(sum_sales#160), sum(number_sales#161)]
Aggregate Attributes [2]: [sum(sum_sales#160)#168, sum(number_sales#161)#169]
Results [6]: [channel#151, null AS i_brand_id#170, null AS i_class_id#171, null AS i_category_id#172, sum(sum_sales#160)#168 AS sum(sum_sales)#173, sum(number_sales#161)#169 AS sum(number_sales)#174]

(116) ReusedExchange [Reuses operator id: 99]
Output [7]: [channel#175, i_brand_id#176, i_class_id#177, i_category_id#178, sum#179, isEmpty#180, sum#181]

(117) HashAggregate [codegen id : 403]
Input [7]: [channel#175, i_brand_id#176, i_class_id#177, i_category_id#178, sum#179, isEmpty#180, sum#181]
Keys [4]: [channel#175, i_brand_id#176, i_class_id#177, i_category_id#178]
Functions [2]: [sum(sales#182), sum(number_sales#183)]
Aggregate Attributes [2]: [sum(sales#182)#102, sum(number_sales#183)#103]
Results [2]: [sum(sales#182)#102 AS sum_sales#184, sum(number_sales#183)#103 AS number_sales#185]

(118) HashAggregate [codegen id : 403]
Input [2]: [sum_sales#184, number_sales#185]
Keys: []
Functions [2]: [partial_sum(sum_sales#184), partial_sum(number_sales#185)]
Aggregate Attributes [3]: [sum#186, isEmpty#187, sum#188]
Results [3]: [sum#189, isEmpty#190, sum#191]

(119) Exchange
Input [3]: [sum#189, isEmpty#190, sum#191]
Arguments: SinglePartition, ENSURE_REQUIREMENTS, [plan_id=16]

(120) HashAggregate [codegen id : 404]
Input [3]: [sum#189, isEmpty#190, sum#191]
Keys: []
Functions [2]: [sum(sum_sales#184), sum(number_sales#185)]
Aggregate Attributes [2]: [sum(sum_sales#184)#192, sum(number_sales#185)#193]
Results [6]: [null AS channel#194, null AS i_brand_id#195, null AS i_class_id#196, null AS i_category_id#197, sum(sum_sales#184)#192 AS sum(sum_sales)#198, sum(number_sales#185)#193 AS sum(number_sales)#199]

(121) Union

(122) HashAggregate [codegen id : 405]
Input [6]: [channel#49, i_brand_id#37, i_class_id#38, i_category_id#39, sum_sales#104, number_sales#105]
Keys [6]: [channel#49, i_brand_id#37, i_class_id#38, i_category_id#39, sum_sales#104, number_sales#105]
Functions: []
Aggregate Attributes: []
Results [6]: [channel#49, i_brand_id#37, i_class_id#38, i_category_id#39, sum_sales#104, number_sales#105]

(123) Exchange
Input [6]: [channel#49, i_brand_id#37, i_class_id#38, i_category_id#39, sum_sales#104, number_sales#105]
Arguments: hashpartitioning(channel#49, i_brand_id#37, i_class_id#38, i_category_id#39, sum_sales#104, number_sales#105, 5), ENSURE_REQUIREMENTS, [plan_id=17]

(124) HashAggregate [codegen id : 406]
Input [6]: [channel#49, i_brand_id#37, i_class_id#38, i_category_id#39, sum_sales#104, number_sales#105]
Keys [6]: [channel#49, i_brand_id#37, i_class_id#38, i_category_id#39, sum_sales#104, number_sales#105]
Functions: []
Aggregate Attributes: []
Results [6]: [channel#49, i_brand_id#37, i_class_id#38, i_category_id#39, sum_sales#104, number_sales#105]

(125) TakeOrderedAndProject
Input [6]: [channel#49, i_brand_id#37, i_class_id#38, i_category_id#39, sum_sales#104, number_sales#105]
Arguments: 100, [channel#49 ASC NULLS FIRST, i_brand_id#37 ASC NULLS FIRST, i_class_id#38 ASC NULLS FIRST, i_category_id#39 ASC NULLS FIRST], [channel#49, i_brand_id#37, i_class_id#38, i_category_id#39, sum_sales#104, number_sales#105]

===== Subqueries =====

Subquery:1 Hosting operator id = 66 Hosting Expression = Subquery scalar-subquery#52, [id=#53]
* HashAggregate (144)
+- Exchange (143)
   +- * HashAggregate (142)
      +- Union (141)
         :- * Project (130)
         :  +- * BroadcastHashJoin Inner BuildRight (129)
         :     :- * ColumnarToRow (127)
         :     :  +- Scan parquet spark_catalog.default.store_sales (126)
         :     +- ReusedExchange (128)
         :- * Project (135)
         :  +- * BroadcastHashJoin Inner BuildRight (134)
         :     :- * ColumnarToRow (132)
         :     :  +- Scan parquet spark_catalog.default.catalog_sales (131)
         :     +- ReusedExchange (133)
         +- * Project (140)
            +- * BroadcastHashJoin Inner BuildRight (139)
               :- * ColumnarToRow (137)
               :  +- Scan parquet spark_catalog.default.web_sales (136)
               +- ReusedExchange (138)


(126) Scan parquet spark_catalog.default.store_sales
Output [3]: [ss_quantity#200, ss_list_price#201, ss_sold_date_sk#202]
Batched: true
Location: InMemoryFileIndex []
PartitionFilters: [isnotnull(ss_sold_date_sk#202), dynamicpruningexpression(ss_sold_date_sk#202 IN dynamicpruning#12)]
ReadSchema: struct<ss_quantity:int,ss_list_price:decimal(7,2)>

(127) ColumnarToRow [codegen id : 2]
Input [3]: [ss_quantity#200, ss_list_price#201, ss_sold_date_sk#202]

(128) ReusedExchange [Reuses operator id: 159]
Output [1]: [d_date_sk#203]

(129) BroadcastHashJoin [codegen id : 2]
Left keys [1]: [ss_sold_date_sk#202]
Right keys [1]: [d_date_sk#203]
Join type: Inner
Join condition: None

(130) Project [codegen id : 2]
Output [2]: [ss_quantity#200 AS quantity#204, ss_list_price#201 AS list_price#205]
Input [4]: [ss_quantity#200, ss_list_price#201, ss_sold_date_sk#202, d_date_sk#203]

(131) Scan parquet spark_catalog.default.catalog_sales
Output [3]: [cs_quantity#206, cs_list_price#207, cs_sold_date_sk#208]
Batched: true
Location: InMemoryFileIndex []
PartitionFilters: [isnotnull(cs_sold_date_sk#208), dynamicpruningexpression(cs_sold_date_sk#208 IN dynamicpruning#209)]
ReadSchema: struct<cs_quantity:int,cs_list_price:decimal(7,2)>

(132) ColumnarToRow [codegen id : 4]
Input [3]: [cs_quantity#206, cs_list_price#207, cs_sold_date_sk#208]

(133) ReusedExchange [Reuses operator id: 149]
Output [1]: [d_date_sk#210]

(134) BroadcastHashJoin [codegen id : 4]
Left keys [1]: [cs_sold_date_sk#208]
Right keys [1]: [d_date_sk#210]
Join type: Inner
Join condition: None

(135) Project [codegen id : 4]
Output [2]: [cs_quantity#206 AS quantity#211, cs_list_price#207 AS list_price#212]
Input [4]: [cs_quantity#206, cs_list_price#207, cs_sold_date_sk#208, d_date_sk#210]

(136) Scan parquet spark_catalog.default.web_sales
Output [3]: [ws_quantity#213, ws_list_price#214, ws_sold_date_sk#215]
Batched: true
Location: InMemoryFileIndex []
PartitionFilters: [isnotnull(ws_sold_date_sk#215), dynamicpruningexpression(ws_sold_date_sk#215 IN dynamicpruning#209)]
ReadSchema: struct<ws_quantity:int,ws_list_price:decimal(7,2)>

(137) ColumnarToRow [codegen id : 6]
Input [3]: [ws_quantity#213, ws_list_price#214, ws_sold_date_sk#215]

(138) ReusedExchange [Reuses operator id: 149]
Output [1]: [d_date_sk#216]

(139) BroadcastHashJoin [codegen id : 6]
Left keys [1]: [ws_sold_date_sk#215]
Right keys [1]: [d_date_sk#216]
Join type: Inner
Join condition: None

(140) Project [codegen id : 6]
Output [2]: [ws_quantity#213 AS quantity#217, ws_list_price#214 AS list_price#218]
Input [4]: [ws_quantity#213, ws_list_price#214, ws_sold_date_sk#215, d_date_sk#216]

(141) Union

(142) HashAggregate [codegen id : 7]
Input [2]: [quantity#204, list_price#205]
Keys: []
Functions [1]: [partial_avg((cast(quantity#204 as decimal(10,0)) * list_price#205))]
Aggregate Attributes [2]: [sum#219, count#220]
Results [2]: [sum#221, count#222]

(143) Exchange
Input [2]: [sum#221, count#222]
Arguments: SinglePartition, ENSURE_REQUIREMENTS, [plan_id=18]

(144) HashAggregate [codegen id : 8]
Input [2]: [sum#221, count#222]
Keys: []
Functions [1]: [avg((cast(quantity#204 as decimal(10,0)) * list_price#205))]
Aggregate Attributes [1]: [avg((cast(quantity#204 as decimal(10,0)) * list_price#205))#223]
Results [1]: [avg((cast(quantity#204 as decimal(10,0)) * list_price#205))#223 AS average_sales#224]

Subquery:2 Hosting operator id = 126 Hosting Expression = ss_sold_date_sk#202 IN dynamicpruning#12

Subquery:3 Hosting operator id = 131 Hosting Expression = cs_sold_date_sk#208 IN dynamicpruning#209
BroadcastExchange (149)
+- * Project (148)
   +- * Filter (147)
      +- * ColumnarToRow (146)
         +- Scan parquet spark_catalog.default.date_dim (145)


(145) Scan parquet spark_catalog.default.date_dim
Output [2]: [d_date_sk#210, d_year#225]
Batched: true
Location [not included in comparison]/{warehouse_dir}/date_dim]
PushedFilters: [IsNotNull(d_year), GreaterThanOrEqual(d_year,1998), LessThanOrEqual(d_year,2000), IsNotNull(d_date_sk)]
ReadSchema: struct<d_date_sk:int,d_year:int>

(146) ColumnarToRow [codegen id : 1]
Input [2]: [d_date_sk#210, d_year#225]

(147) Filter [codegen id : 1]
Input [2]: [d_date_sk#210, d_year#225]
Condition : (((isnotnull(d_year#225) AND (d_year#225 >= 1998)) AND (d_year#225 <= 2000)) AND isnotnull(d_date_sk#210))

(148) Project [codegen id : 1]
Output [1]: [d_date_sk#210]
Input [2]: [d_date_sk#210, d_year#225]

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

Subquery:4 Hosting operator id = 136 Hosting Expression = ws_sold_date_sk#215 IN dynamicpruning#209

Subquery:5 Hosting operator id = 1 Hosting Expression = ss_sold_date_sk#4 IN dynamicpruning#5
BroadcastExchange (154)
+- * Project (153)
   +- * Filter (152)
      +- * ColumnarToRow (151)
         +- Scan parquet spark_catalog.default.date_dim (150)


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

(151) ColumnarToRow [codegen id : 1]
Input [3]: [d_date_sk#40, d_year#226, d_moy#227]

(152) Filter [codegen id : 1]
Input [3]: [d_date_sk#40, d_year#226, d_moy#227]
Condition : ((((isnotnull(d_year#226) AND isnotnull(d_moy#227)) AND (d_year#226 = 2000)) AND (d_moy#227 = 11)) AND isnotnull(d_date_sk#40))

(153) Project [codegen id : 1]
Output [1]: [d_date_sk#40]
Input [3]: [d_date_sk#40, d_year#226, d_moy#227]

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

Subquery:6 Hosting operator id = 7 Hosting Expression = ss_sold_date_sk#11 IN dynamicpruning#12
BroadcastExchange (159)
+- * Project (158)
   +- * Filter (157)
      +- * ColumnarToRow (156)
         +- Scan parquet spark_catalog.default.date_dim (155)


(155) Scan parquet spark_catalog.default.date_dim
Output [2]: [d_date_sk#24, d_year#228]
Batched: true
Location [not included in comparison]/{warehouse_dir}/date_dim]
PushedFilters: [IsNotNull(d_year), GreaterThanOrEqual(d_year,1999), LessThanOrEqual(d_year,2001), IsNotNull(d_date_sk)]
ReadSchema: struct<d_date_sk:int,d_year:int>

(156) ColumnarToRow [codegen id : 1]
Input [2]: [d_date_sk#24, d_year#228]

(157) Filter [codegen id : 1]
Input [2]: [d_date_sk#24, d_year#228]
Condition : (((isnotnull(d_year#228) AND (d_year#228 >= 1999)) AND (d_year#228 <= 2001)) AND isnotnull(d_date_sk#24))

(158) Project [codegen id : 1]
Output [1]: [d_date_sk#24]
Input [2]: [d_date_sk#24, d_year#228]

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

Subquery:7 Hosting operator id = 13 Hosting Expression = cs_sold_date_sk#18 IN dynamicpruning#12

Subquery:8 Hosting operator id = 36 Hosting Expression = ws_sold_date_sk#29 IN dynamicpruning#12

Subquery:9 Hosting operator id = 81 Hosting Expression = ReusedSubquery Subquery scalar-subquery#52, [id=#53]

Subquery:10 Hosting operator id = 67 Hosting Expression = cs_sold_date_sk#57 IN dynamicpruning#5

Subquery:11 Hosting operator id = 96 Hosting Expression = ReusedSubquery Subquery scalar-subquery#52, [id=#53]

Subquery:12 Hosting operator id = 82 Hosting Expression = ws_sold_date_sk#78 IN dynamicpruning#5


