== Physical Plan ==
* Sort (16)
+- Exchange (15)
   +- * HashAggregate (14)
      +- Exchange (13)
         +- * HashAggregate (12)
            +- * Project (11)
               +- * BroadcastHashJoin LeftSemi BuildRight (10)
                  :- * Project (4)
                  :  +- * Filter (3)
                  :     +- * ColumnarToRow (2)
                  :        +- Scan parquet spark_catalog.default.orders (1)
                  +- BroadcastExchange (9)
                     +- * Project (8)
                        +- * Filter (7)
                           +- * ColumnarToRow (6)
                              +- Scan parquet spark_catalog.default.lineitem (5)


(1) Scan parquet spark_catalog.default.orders
Output [3]: [o_orderkey#1, o_orderdate#2, o_orderpriority#3]
Batched: true
Location [not included in comparison]/{warehouse_dir}/orders]
PushedFilters: [IsNotNull(o_orderdate), GreaterThanOrEqual(o_orderdate,1993-07-01), LessThan(o_orderdate,1993-10-01)]
ReadSchema: struct<o_orderkey:bigint,o_orderdate:date,o_orderpriority:string>

(2) ColumnarToRow [codegen id : 2]
Input [3]: [o_orderkey#1, o_orderdate#2, o_orderpriority#3]

(3) Filter [codegen id : 2]
Input [3]: [o_orderkey#1, o_orderdate#2, o_orderpriority#3]
Condition : ((isnotnull(o_orderdate#2) AND (o_orderdate#2 >= 1993-07-01)) AND (o_orderdate#2 < 1993-10-01))

(4) Project [codegen id : 2]
Output [2]: [o_orderkey#1, o_orderpriority#3]
Input [3]: [o_orderkey#1, o_orderdate#2, o_orderpriority#3]

(5) Scan parquet spark_catalog.default.lineitem
Output [3]: [l_orderkey#4, l_commitdate#5, l_receiptdate#6]
Batched: true
Location [not included in comparison]/{warehouse_dir}/lineitem]
PushedFilters: [IsNotNull(l_commitdate), IsNotNull(l_receiptdate)]
ReadSchema: struct<l_orderkey:bigint,l_commitdate:date,l_receiptdate:date>

(6) ColumnarToRow [codegen id : 1]
Input [3]: [l_orderkey#4, l_commitdate#5, l_receiptdate#6]

(7) Filter [codegen id : 1]
Input [3]: [l_orderkey#4, l_commitdate#5, l_receiptdate#6]
Condition : ((isnotnull(l_commitdate#5) AND isnotnull(l_receiptdate#6)) AND (l_commitdate#5 < l_receiptdate#6))

(8) Project [codegen id : 1]
Output [1]: [l_orderkey#4]
Input [3]: [l_orderkey#4, l_commitdate#5, l_receiptdate#6]

(9) BroadcastExchange
Input [1]: [l_orderkey#4]
Arguments: HashedRelationBroadcastMode(List(input[0, bigint, true]),false), [plan_id=1]

(10) BroadcastHashJoin [codegen id : 2]
Left keys [1]: [o_orderkey#1]
Right keys [1]: [l_orderkey#4]
Join type: LeftSemi
Join condition: None

(11) Project [codegen id : 2]
Output [1]: [o_orderpriority#3]
Input [2]: [o_orderkey#1, o_orderpriority#3]

(12) HashAggregate [codegen id : 2]
Input [1]: [o_orderpriority#3]
Keys [1]: [o_orderpriority#3]
Functions [1]: [partial_count(1)]
Aggregate Attributes [1]: [count#7]
Results [2]: [o_orderpriority#3, count#8]

(13) Exchange
Input [2]: [o_orderpriority#3, count#8]
Arguments: hashpartitioning(o_orderpriority#3, 5), ENSURE_REQUIREMENTS, [plan_id=2]

(14) HashAggregate [codegen id : 3]
Input [2]: [o_orderpriority#3, count#8]
Keys [1]: [o_orderpriority#3]
Functions [1]: [count(1)]
Aggregate Attributes [1]: [count(1)#9]
Results [2]: [o_orderpriority#3, count(1)#9 AS order_count#10]

(15) Exchange
Input [2]: [o_orderpriority#3, order_count#10]
Arguments: rangepartitioning(o_orderpriority#3 ASC NULLS FIRST, 5), ENSURE_REQUIREMENTS, [plan_id=3]

(16) Sort [codegen id : 4]
Input [2]: [o_orderpriority#3, order_count#10]
Arguments: [o_orderpriority#3 ASC NULLS FIRST], true, 0

