== Physical Plan ==
* Sort (40)
+- Exchange (39)
   +- * HashAggregate (38)
      +- Exchange (37)
         +- * HashAggregate (36)
            +- * Project (35)
               +- * BroadcastHashJoin Inner BuildRight (34)
                  :- * Project (28)
                  :  +- * BroadcastHashJoin Inner BuildRight (27)
                  :     :- * Project (22)
                  :     :  +- * BroadcastHashJoin Inner BuildRight (21)
                  :     :     :- * Project (16)
                  :     :     :  +- * BroadcastHashJoin Inner BuildRight (15)
                  :     :     :     :- * Project (10)
                  :     :     :     :  +- * BroadcastHashJoin Inner BuildRight (9)
                  :     :     :     :     :- * Filter (3)
                  :     :     :     :     :  +- * ColumnarToRow (2)
                  :     :     :     :     :     +- Scan parquet default.customer (1)
                  :     :     :     :     +- BroadcastExchange (8)
                  :     :     :     :        +- * Project (7)
                  :     :     :     :           +- * Filter (6)
                  :     :     :     :              +- * ColumnarToRow (5)
                  :     :     :     :                 +- Scan parquet default.orders (4)
                  :     :     :     +- BroadcastExchange (14)
                  :     :     :        +- * Filter (13)
                  :     :     :           +- * ColumnarToRow (12)
                  :     :     :              +- Scan parquet default.lineitem (11)
                  :     :     +- BroadcastExchange (20)
                  :     :        +- * Filter (19)
                  :     :           +- * ColumnarToRow (18)
                  :     :              +- Scan parquet default.supplier (17)
                  :     +- BroadcastExchange (26)
                  :        +- * Filter (25)
                  :           +- * ColumnarToRow (24)
                  :              +- Scan parquet default.nation (23)
                  +- BroadcastExchange (33)
                     +- * Project (32)
                        +- * Filter (31)
                           +- * ColumnarToRow (30)
                              +- Scan parquet default.region (29)


(1) Scan parquet default.customer
Output [2]: [c_custkey#1, c_nationkey#2]
Batched: true
Location [not included in comparison]/{warehouse_dir}/customer]
PushedFilters: [IsNotNull(c_custkey), IsNotNull(c_nationkey)]
ReadSchema: struct<c_custkey:bigint,c_nationkey:bigint>

(2) ColumnarToRow [codegen id : 6]
Input [2]: [c_custkey#1, c_nationkey#2]

(3) Filter [codegen id : 6]
Input [2]: [c_custkey#1, c_nationkey#2]
Condition : (isnotnull(c_custkey#1) AND isnotnull(c_nationkey#2))

(4) Scan parquet default.orders
Output [3]: [o_orderkey#3, o_custkey#4, o_orderdate#5]
Batched: true
Location [not included in comparison]/{warehouse_dir}/orders]
PushedFilters: [IsNotNull(o_orderdate), GreaterThanOrEqual(o_orderdate,1994-01-01), LessThan(o_orderdate,1995-01-01), IsNotNull(o_custkey), IsNotNull(o_orderkey)]
ReadSchema: struct<o_orderkey:bigint,o_custkey:bigint,o_orderdate:date>

(5) ColumnarToRow [codegen id : 1]
Input [3]: [o_orderkey#3, o_custkey#4, o_orderdate#5]

(6) Filter [codegen id : 1]
Input [3]: [o_orderkey#3, o_custkey#4, o_orderdate#5]
Condition : ((((isnotnull(o_orderdate#5) AND (o_orderdate#5 >= 1994-01-01)) AND (o_orderdate#5 < 1995-01-01)) AND isnotnull(o_custkey#4)) AND isnotnull(o_orderkey#3))

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

(8) BroadcastExchange
Input [2]: [o_orderkey#3, o_custkey#4]
Arguments: HashedRelationBroadcastMode(List(input[1, bigint, true]),false), [id=#6]

(9) BroadcastHashJoin [codegen id : 6]
Left keys [1]: [c_custkey#1]
Right keys [1]: [o_custkey#4]
Join condition: None

(10) Project [codegen id : 6]
Output [2]: [c_nationkey#2, o_orderkey#3]
Input [4]: [c_custkey#1, c_nationkey#2, o_orderkey#3, o_custkey#4]

(11) Scan parquet default.lineitem
Output [4]: [l_orderkey#7, l_suppkey#8, l_extendedprice#9, l_discount#10]
Batched: true
Location [not included in comparison]/{warehouse_dir}/lineitem]
PushedFilters: [IsNotNull(l_orderkey), IsNotNull(l_suppkey)]
ReadSchema: struct<l_orderkey:bigint,l_suppkey:bigint,l_extendedprice:decimal(10,0),l_discount:decimal(10,0)>

(12) ColumnarToRow [codegen id : 2]
Input [4]: [l_orderkey#7, l_suppkey#8, l_extendedprice#9, l_discount#10]

(13) Filter [codegen id : 2]
Input [4]: [l_orderkey#7, l_suppkey#8, l_extendedprice#9, l_discount#10]
Condition : (isnotnull(l_orderkey#7) AND isnotnull(l_suppkey#8))

(14) BroadcastExchange
Input [4]: [l_orderkey#7, l_suppkey#8, l_extendedprice#9, l_discount#10]
Arguments: HashedRelationBroadcastMode(List(input[0, bigint, false]),false), [id=#11]

(15) BroadcastHashJoin [codegen id : 6]
Left keys [1]: [o_orderkey#3]
Right keys [1]: [l_orderkey#7]
Join condition: None

(16) Project [codegen id : 6]
Output [4]: [c_nationkey#2, l_suppkey#8, l_extendedprice#9, l_discount#10]
Input [6]: [c_nationkey#2, o_orderkey#3, l_orderkey#7, l_suppkey#8, l_extendedprice#9, l_discount#10]

(17) Scan parquet default.supplier
Output [2]: [s_suppkey#12, s_nationkey#13]
Batched: true
Location [not included in comparison]/{warehouse_dir}/supplier]
PushedFilters: [IsNotNull(s_suppkey), IsNotNull(s_nationkey)]
ReadSchema: struct<s_suppkey:bigint,s_nationkey:bigint>

(18) ColumnarToRow [codegen id : 3]
Input [2]: [s_suppkey#12, s_nationkey#13]

(19) Filter [codegen id : 3]
Input [2]: [s_suppkey#12, s_nationkey#13]
Condition : (isnotnull(s_suppkey#12) AND isnotnull(s_nationkey#13))

(20) BroadcastExchange
Input [2]: [s_suppkey#12, s_nationkey#13]
Arguments: HashedRelationBroadcastMode(List(input[0, bigint, false], input[1, bigint, false]),false), [id=#14]

(21) BroadcastHashJoin [codegen id : 6]
Left keys [2]: [l_suppkey#8, c_nationkey#2]
Right keys [2]: [s_suppkey#12, s_nationkey#13]
Join condition: None

(22) Project [codegen id : 6]
Output [3]: [l_extendedprice#9, l_discount#10, s_nationkey#13]
Input [6]: [c_nationkey#2, l_suppkey#8, l_extendedprice#9, l_discount#10, s_suppkey#12, s_nationkey#13]

(23) Scan parquet default.nation
Output [3]: [n_nationkey#15, n_name#16, n_regionkey#17]
Batched: true
Location [not included in comparison]/{warehouse_dir}/nation]
PushedFilters: [IsNotNull(n_nationkey), IsNotNull(n_regionkey)]
ReadSchema: struct<n_nationkey:bigint,n_name:string,n_regionkey:bigint>

(24) ColumnarToRow [codegen id : 4]
Input [3]: [n_nationkey#15, n_name#16, n_regionkey#17]

(25) Filter [codegen id : 4]
Input [3]: [n_nationkey#15, n_name#16, n_regionkey#17]
Condition : (isnotnull(n_nationkey#15) AND isnotnull(n_regionkey#17))

(26) BroadcastExchange
Input [3]: [n_nationkey#15, n_name#16, n_regionkey#17]
Arguments: HashedRelationBroadcastMode(List(input[0, bigint, false]),false), [id=#18]

(27) BroadcastHashJoin [codegen id : 6]
Left keys [1]: [s_nationkey#13]
Right keys [1]: [n_nationkey#15]
Join condition: None

(28) Project [codegen id : 6]
Output [4]: [l_extendedprice#9, l_discount#10, n_name#16, n_regionkey#17]
Input [6]: [l_extendedprice#9, l_discount#10, s_nationkey#13, n_nationkey#15, n_name#16, n_regionkey#17]

(29) Scan parquet default.region
Output [2]: [r_regionkey#19, r_name#20]
Batched: true
Location [not included in comparison]/{warehouse_dir}/region]
PushedFilters: [IsNotNull(r_name), EqualTo(r_name,ASIA), IsNotNull(r_regionkey)]
ReadSchema: struct<r_regionkey:bigint,r_name:string>

(30) ColumnarToRow [codegen id : 5]
Input [2]: [r_regionkey#19, r_name#20]

(31) Filter [codegen id : 5]
Input [2]: [r_regionkey#19, r_name#20]
Condition : ((isnotnull(r_name#20) AND (r_name#20 = ASIA)) AND isnotnull(r_regionkey#19))

(32) Project [codegen id : 5]
Output [1]: [r_regionkey#19]
Input [2]: [r_regionkey#19, r_name#20]

(33) BroadcastExchange
Input [1]: [r_regionkey#19]
Arguments: HashedRelationBroadcastMode(List(input[0, bigint, true]),false), [id=#21]

(34) BroadcastHashJoin [codegen id : 6]
Left keys [1]: [n_regionkey#17]
Right keys [1]: [r_regionkey#19]
Join condition: None

(35) Project [codegen id : 6]
Output [3]: [l_extendedprice#9, l_discount#10, n_name#16]
Input [5]: [l_extendedprice#9, l_discount#10, n_name#16, n_regionkey#17, r_regionkey#19]

(36) HashAggregate [codegen id : 6]
Input [3]: [l_extendedprice#9, l_discount#10, n_name#16]
Keys [1]: [n_name#16]
Functions [1]: [partial_sum(CheckOverflow((promote_precision(cast(l_extendedprice#9 as decimal(11,0))) * promote_precision(CheckOverflow((1 - promote_precision(cast(l_discount#10 as decimal(11,0)))), DecimalType(11,0)))), DecimalType(22,0)))]
Aggregate Attributes [2]: [sum#22, isEmpty#23]
Results [3]: [n_name#16, sum#24, isEmpty#25]

(37) Exchange
Input [3]: [n_name#16, sum#24, isEmpty#25]
Arguments: hashpartitioning(n_name#16, 5), ENSURE_REQUIREMENTS, [id=#26]

(38) HashAggregate [codegen id : 7]
Input [3]: [n_name#16, sum#24, isEmpty#25]
Keys [1]: [n_name#16]
Functions [1]: [sum(CheckOverflow((promote_precision(cast(l_extendedprice#9 as decimal(11,0))) * promote_precision(CheckOverflow((1 - promote_precision(cast(l_discount#10 as decimal(11,0)))), DecimalType(11,0)))), DecimalType(22,0)))]
Aggregate Attributes [1]: [sum(CheckOverflow((promote_precision(cast(l_extendedprice#9 as decimal(11,0))) * promote_precision(CheckOverflow((1 - promote_precision(cast(l_discount#10 as decimal(11,0)))), DecimalType(11,0)))), DecimalType(22,0)))#27]
Results [2]: [n_name#16, sum(CheckOverflow((promote_precision(cast(l_extendedprice#9 as decimal(11,0))) * promote_precision(CheckOverflow((1 - promote_precision(cast(l_discount#10 as decimal(11,0)))), DecimalType(11,0)))), DecimalType(22,0)))#27 AS revenue#28]

(39) Exchange
Input [2]: [n_name#16, revenue#28]
Arguments: rangepartitioning(revenue#28 DESC NULLS LAST, 5), ENSURE_REQUIREMENTS, [id=#29]

(40) Sort [codegen id : 8]
Input [2]: [n_name#16, revenue#28]
Arguments: [revenue#28 DESC NULLS LAST], true, 0

