== Physical Plan ==
TakeOrderedAndProject (25)
+- * HashAggregate (24)
   +- Exchange (23)
      +- * HashAggregate (22)
         +- * Project (21)
            +- * BroadcastHashJoin Inner BuildLeft (20)
               :- BroadcastExchange (15)
               :  +- * Project (14)
               :     +- * BroadcastHashJoin Inner BuildRight (13)
               :        :- * Project (11)
               :        :  +- * BroadcastHashJoin Inner BuildRight (10)
               :        :     :- * Project (4)
               :        :     :  +- * Filter (3)
               :        :     :     +- * ColumnarToRow (2)
               :        :     :        +- Scan parquet spark_catalog.default.item (1)
               :        :     +- BroadcastExchange (9)
               :        :        +- * Project (8)
               :        :           +- * Filter (7)
               :        :              +- * ColumnarToRow (6)
               :        :                 +- Scan parquet spark_catalog.default.inventory (5)
               :        +- ReusedExchange (12)
               +- * Project (19)
                  +- * Filter (18)
                     +- * ColumnarToRow (17)
                        +- Scan parquet spark_catalog.default.store_sales (16)


(1) Scan parquet spark_catalog.default.item
Output [5]: [i_item_sk#1, i_item_id#2, i_item_desc#3, i_current_price#4, i_manufact_id#5]
Batched: true
Location [not included in comparison]/{warehouse_dir}/item]
PushedFilters: [IsNotNull(i_current_price), GreaterThanOrEqual(i_current_price,62.00), LessThanOrEqual(i_current_price,92.00), In(i_manufact_id, [129,270,423,821]), IsNotNull(i_item_sk)]
ReadSchema: struct<i_item_sk:int,i_item_id:string,i_item_desc:string,i_current_price:decimal(7,2),i_manufact_id:int>

(2) ColumnarToRow [codegen id : 3]
Input [5]: [i_item_sk#1, i_item_id#2, i_item_desc#3, i_current_price#4, i_manufact_id#5]

(3) Filter [codegen id : 3]
Input [5]: [i_item_sk#1, i_item_id#2, i_item_desc#3, i_current_price#4, i_manufact_id#5]
Condition : ((((isnotnull(i_current_price#4) AND (i_current_price#4 >= 62.00)) AND (i_current_price#4 <= 92.00)) AND i_manufact_id#5 IN (129,270,821,423)) AND isnotnull(i_item_sk#1))

(4) Project [codegen id : 3]
Output [4]: [i_item_sk#1, i_item_id#2, i_item_desc#3, i_current_price#4]
Input [5]: [i_item_sk#1, i_item_id#2, i_item_desc#3, i_current_price#4, i_manufact_id#5]

(5) Scan parquet spark_catalog.default.inventory
Output [3]: [inv_item_sk#6, inv_quantity_on_hand#7, inv_date_sk#8]
Batched: true
Location: InMemoryFileIndex []
PartitionFilters: [isnotnull(inv_date_sk#8), dynamicpruningexpression(inv_date_sk#8 IN dynamicpruning#9)]
PushedFilters: [IsNotNull(inv_quantity_on_hand), GreaterThanOrEqual(inv_quantity_on_hand,100), LessThanOrEqual(inv_quantity_on_hand,500), IsNotNull(inv_item_sk)]
ReadSchema: struct<inv_item_sk:int,inv_quantity_on_hand:int>

(6) ColumnarToRow [codegen id : 1]
Input [3]: [inv_item_sk#6, inv_quantity_on_hand#7, inv_date_sk#8]

(7) Filter [codegen id : 1]
Input [3]: [inv_item_sk#6, inv_quantity_on_hand#7, inv_date_sk#8]
Condition : (((isnotnull(inv_quantity_on_hand#7) AND (inv_quantity_on_hand#7 >= 100)) AND (inv_quantity_on_hand#7 <= 500)) AND isnotnull(inv_item_sk#6))

(8) Project [codegen id : 1]
Output [2]: [inv_item_sk#6, inv_date_sk#8]
Input [3]: [inv_item_sk#6, inv_quantity_on_hand#7, inv_date_sk#8]

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

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

(11) Project [codegen id : 3]
Output [5]: [i_item_sk#1, i_item_id#2, i_item_desc#3, i_current_price#4, inv_date_sk#8]
Input [6]: [i_item_sk#1, i_item_id#2, i_item_desc#3, i_current_price#4, inv_item_sk#6, inv_date_sk#8]

(12) ReusedExchange [Reuses operator id: 30]
Output [1]: [d_date_sk#10]

(13) BroadcastHashJoin [codegen id : 3]
Left keys [1]: [inv_date_sk#8]
Right keys [1]: [d_date_sk#10]
Join type: Inner
Join condition: None

(14) Project [codegen id : 3]
Output [4]: [i_item_sk#1, i_item_id#2, i_item_desc#3, i_current_price#4]
Input [6]: [i_item_sk#1, i_item_id#2, i_item_desc#3, i_current_price#4, inv_date_sk#8, d_date_sk#10]

(15) BroadcastExchange
Input [4]: [i_item_sk#1, i_item_id#2, i_item_desc#3, i_current_price#4]
Arguments: HashedRelationBroadcastMode(List(cast(input[0, int, true] as bigint)),false), [plan_id=2]

(16) Scan parquet spark_catalog.default.store_sales
Output [2]: [ss_item_sk#11, ss_sold_date_sk#12]
Batched: true
Location [not included in comparison]/{warehouse_dir}/store_sales]
PushedFilters: [IsNotNull(ss_item_sk)]
ReadSchema: struct<ss_item_sk:int>

(17) ColumnarToRow
Input [2]: [ss_item_sk#11, ss_sold_date_sk#12]

(18) Filter
Input [2]: [ss_item_sk#11, ss_sold_date_sk#12]
Condition : isnotnull(ss_item_sk#11)

(19) Project
Output [1]: [ss_item_sk#11]
Input [2]: [ss_item_sk#11, ss_sold_date_sk#12]

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

(21) Project [codegen id : 4]
Output [3]: [i_item_id#2, i_item_desc#3, i_current_price#4]
Input [5]: [i_item_sk#1, i_item_id#2, i_item_desc#3, i_current_price#4, ss_item_sk#11]

(22) HashAggregate [codegen id : 4]
Input [3]: [i_item_id#2, i_item_desc#3, i_current_price#4]
Keys [3]: [i_item_id#2, i_item_desc#3, i_current_price#4]
Functions: []
Aggregate Attributes: []
Results [3]: [i_item_id#2, i_item_desc#3, i_current_price#4]

(23) Exchange
Input [3]: [i_item_id#2, i_item_desc#3, i_current_price#4]
Arguments: hashpartitioning(i_item_id#2, i_item_desc#3, i_current_price#4, 5), ENSURE_REQUIREMENTS, [plan_id=3]

(24) HashAggregate [codegen id : 5]
Input [3]: [i_item_id#2, i_item_desc#3, i_current_price#4]
Keys [3]: [i_item_id#2, i_item_desc#3, i_current_price#4]
Functions: []
Aggregate Attributes: []
Results [3]: [i_item_id#2, i_item_desc#3, i_current_price#4]

(25) TakeOrderedAndProject
Input [3]: [i_item_id#2, i_item_desc#3, i_current_price#4]
Arguments: 100, [i_item_id#2 ASC NULLS FIRST], [i_item_id#2, i_item_desc#3, i_current_price#4]

===== Subqueries =====

Subquery:1 Hosting operator id = 5 Hosting Expression = inv_date_sk#8 IN dynamicpruning#9
BroadcastExchange (30)
+- * Project (29)
   +- * Filter (28)
      +- * ColumnarToRow (27)
         +- Scan parquet spark_catalog.default.date_dim (26)


(26) Scan parquet spark_catalog.default.date_dim
Output [2]: [d_date_sk#10, d_date#13]
Batched: true
Location [not included in comparison]/{warehouse_dir}/date_dim]
PushedFilters: [IsNotNull(d_date), GreaterThanOrEqual(d_date,2000-05-25), LessThanOrEqual(d_date,2000-07-24), IsNotNull(d_date_sk)]
ReadSchema: struct<d_date_sk:int,d_date:date>

(27) ColumnarToRow [codegen id : 1]
Input [2]: [d_date_sk#10, d_date#13]

(28) Filter [codegen id : 1]
Input [2]: [d_date_sk#10, d_date#13]
Condition : (((isnotnull(d_date#13) AND (d_date#13 >= 2000-05-25)) AND (d_date#13 <= 2000-07-24)) AND isnotnull(d_date_sk#10))

(29) Project [codegen id : 1]
Output [1]: [d_date_sk#10]
Input [2]: [d_date_sk#10, d_date#13]

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


