Skip to content

TPCDS Queries

Harish Butani edited this page Jan 6, 2022 · 4 revisions

generated Mon Jan 04 17:59:37 PST 2021

Plan Generation Config

  • generated for tpcds scale 1 instance.
spark.sql.oracle.enable.querysplitting = true
spark.sql.oracle.querysplit.target = 4MB
spark.sql.oracle.querysplit.maxfetch.rounds=0.5

Query q1

Spark SQL

 with customer_total_return as
(select sr_customer_sk as ctr_customer_sk
,sr_store_sk as ctr_store_sk
,sum(SR_RETURN_AMT) as ctr_total_return
from store_returns
,date_dim
where sr_returned_date_sk = d_date_sk
and d_year =2000
group by sr_customer_sk
,sr_store_sk)
 select  c_customer_id
from customer_total_return ctr1
,store
,customer
where ctr1.ctr_total_return > (select avg(ctr_total_return)*1.2
from customer_total_return ctr2
where ctr1.ctr_store_sk = ctr2.ctr_store_sk)
and s_store_sk = ctr1.ctr_store_sk
and s_state = 'TN'
and ctr1.ctr_customer_sk = c_customer_sk
order by c_customer_id
 limit 100; 

Spark Plan with Pushdown turned on

Project (1)
+- BatchScan (2)

(2) BatchScan
Oracle Instance:
   DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
Pushdown Oracle SQL:
select "C_CUSTOMER_ID"
from ( select "C_CUSTOMER_ID"
from ( select "SR_CUSTOMER_SK" AS "ctr_customer_sk", "SR_STORE_SK" AS "ctr_store_sk", SUM("SR_RETURN_AMT") AS "ctr_total_return"
from TPCDS.STORE_RETURNS  join TPCDS.DATE_DIM  on ("SR_RETURNED_DATE_SK" = "D_DATE_SK")
where ((("SR_STORE_SK" IS NOT NULL AND "SR_CUSTOMER_SK" IS NOT NULL) AND "SR_RETURNED_DATE_SK" IS NOT NULL) AND ("D_YEAR" IS NOT NULL AND ("D_YEAR" = 2000.000000000000000000)))
group by "SR_CUSTOMER_SK", "SR_STORE_SK" )  join ( select "1_sparkora", "2_sparkora"
from ( select (AVG("ctr_total_return") * 1.2000000000000000000000) AS "1_sparkora", "ctr_store_sk" AS "2_sparkora"
from ( select "SR_STORE_SK" AS "ctr_store_sk", SUM("SR_RETURN_AMT") AS "ctr_total_return"
from TPCDS.STORE_RETURNS  join TPCDS.DATE_DIM  on ("SR_RETURNED_DATE_SK" = "D_DATE_SK")
where (("SR_STORE_SK" IS NOT NULL AND ("SR_RETURNED_DATE_SK" IS NOT NULL AND "SR_RETURNED_DATE_SK" IS NOT NULL)) AND ("D_YEAR" IS NOT NULL AND ("D_YEAR" = 2000.000000000000000000)))
group by "SR_CUSTOMER_SK", "SR_STORE_SK" ) 
group by "ctr_store_sk" ) 
where "1_sparkora" IS NOT NULL )  on (("ctr_store_sk" = "2_sparkora") AND (cast("ctr_total_return" as NUMBER(38, 20)) > "1_sparkora")) join TPCDS.STORE  on ("ctr_store_sk" = "S_STORE_SK") join TPCDS.CUSTOMER  on ("ctr_customer_sk" = "C_CUSTOMER_SK")
where ("ctr_total_return" IS NOT NULL AND ("S_STATE" IS NOT NULL AND ("S_STATE" = 'TN')))
order by "C_CUSTOMER_ID" ASC NULLS FIRST ) 
where rownum <= 100
Pushdown Oracle SQL, oracle plan stats estimates:
rowCount = 16, bytes=288
Pushdown Oracle SQL, Query Splitting details:
Query is not split

Spark Plan with Pushdown turned off

== Physical Plan ==
TakeOrderedAndProject (54)
+- * Project (53)
   +- * SortMergeJoin Inner (52)
      :- * Sort (47)
      :  +- Exchange (46)
      :     +- * Project (45)
      :        +- * SortMergeJoin Inner (44)
      :           :- * Project (38)
      :           :  +- * SortMergeJoin Inner (37)
      :           :     :- * Sort (17)
      :           :     :  +- Exchange (16)
      :           :     :     +- * Filter (15)
      :           :     :        +- * HashAggregate (14)
      :           :     :           +- Exchange (13)
      :           :     :              +- * HashAggregate (12)
      :           :     :                 +- * Project (11)
      :           :     :                    +- * SortMergeJoin Inner (10)
      :           :     :                       :- * Sort (4)
      :           :     :                       :  +- Exchange (3)
      :           :     :                       :     +- * Filter (2)
      :           :     :                       :        +- BatchScan (1)
      :           :     :                       +- * Sort (9)
      :           :     :                          +- Exchange (8)
      :           :     :                             +- * Project (7)
      :           :     :                                +- * Filter (6)
      :           :     :                                   +- BatchScan (5)
      :           :     +- * Sort (36)
      :           :        +- * Filter (35)
      :           :           +- * HashAggregate (34)
      :           :              +- Exchange (33)
      :           :                 +- * HashAggregate (32)
      :           :                    +- * HashAggregate (31)
      :           :                       +- Exchange (30)
      :           :                          +- * HashAggregate (29)
      :           :                             +- * Project (28)
      :           :                                +- * SortMergeJoin Inner (27)
      :           :                                   :- * Sort (21)
      :           :                                   :  +- Exchange (20)
      :           :                                   :     +- * Filter (19)
      :           :                                   :        +- BatchScan (18)
      :           :                                   +- * Sort (26)
      :           :                                      +- Exchange (25)
      :           :                                         +- * Project (24)
      :           :                                            +- * Filter (23)
      :           :                                               +- BatchScan (22)
      :           +- * Sort (43)
      :              +- Exchange (42)
      :                 +- * Project (41)
      :                    +- * Filter (40)
      :                       +- BatchScan (39)
      +- * Sort (51)
         +- Exchange (50)
            +- * Project (49)
               +- BatchScan (48)


(1) BatchScan
Output [4]: [SR_CUSTOMER_SK#7, SR_STORE_SK#11, SR_RETURN_AMT#15, SR_RETURNED_DATE_SK#4]
Format: orafile
OraPlan: 00 OraTableScan TPCDS.STORE_RETURNS, [SR_CUSTOMER_SK#165, SR_STORE_SK#166, SR_RETURN_AMT#167, SR_RETURNED_DATE_SK#168], [oracolumnref(SR_CUSTOMER_SK#165), oracolumnref(SR_STORE_SK#166), oracolumnref(SR_RETURN_AMT#167), oracolumnref(SR_RETURNED_DATE_SK#168)], orabinaryopexpression((isnotnull(SR_STORE_SK#11) AND isnotnull(SR_CUSTOMER_SK#7)))
PartitionSchema: struct<SR_RETURNED_DATE_SK:decimal(38,18)>
ReadSchema: struct<SR_CUSTOMER_SK:decimal(38,18),SR_STORE_SK:decimal(38,18),SR_RETURN_AMT:decimal(38,18)>
dsKey: DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
oraPushdownSQL: select "SR_CUSTOMER_SK", "SR_STORE_SK", "SR_RETURN_AMT", "SR_RETURNED_DATE_SK"
from TPCDS.STORE_RETURNS
where ("SR_STORE_SK" IS NOT NULL AND "SR_CUSTOMER_SK" IS NOT NULL) and "SR_RETURNED_DATE_SK" IS NOT NULL

(2) Filter [codegen id : 1]
Input [4]: [SR_CUSTOMER_SK#7, SR_STORE_SK#11, SR_RETURN_AMT#15, SR_RETURNED_DATE_SK#4]
Condition : (isnotnull(SR_STORE_SK#11) AND isnotnull(SR_CUSTOMER_SK#7))

(3) Exchange
Input [4]: [SR_CUSTOMER_SK#7, SR_STORE_SK#11, SR_RETURN_AMT#15, SR_RETURNED_DATE_SK#4]
Arguments: hashpartitioning(sr_returned_date_sk#4, 5), ENSURE_REQUIREMENTS, [id=#195]

(4) Sort [codegen id : 2]
Input [4]: [SR_CUSTOMER_SK#7, SR_STORE_SK#11, SR_RETURN_AMT#15, SR_RETURNED_DATE_SK#4]
Arguments: [sr_returned_date_sk#4 ASC NULLS FIRST], false, 0

(5) BatchScan
Output [2]: [D_DATE_SK#24, D_YEAR#30]
Format: orafile
OraPlan: 00 OraTableScan TPCDS.DATE_DIM, [D_DATE_SK#173, D_YEAR#174], [oracolumnref(D_DATE_SK#173), oracolumnref(D_YEAR#174)], orabinaryopexpression((isnotnull(D_YEAR#30) AND (D_YEAR#30 = 2000.000000000000000000)))
PartitionSchema: struct<>
ReadSchema: struct<D_DATE_SK:decimal(38,18),D_YEAR:decimal(38,18)>
dsKey: DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
oraPushdownBindValues: 2000.000000000000000000
oraPushdownSQL: select "D_DATE_SK", "D_YEAR"
from TPCDS.DATE_DIM
where ("D_YEAR" IS NOT NULL AND ("D_YEAR" = ?))

(6) Filter [codegen id : 3]
Input [2]: [D_DATE_SK#24, D_YEAR#30]
Condition : (isnotnull(D_YEAR#30) AND (D_YEAR#30 = 2000.000000000000000000))

(7) Project [codegen id : 3]
Output [1]: [D_DATE_SK#24]
Input [2]: [D_DATE_SK#24, D_YEAR#30]

(8) Exchange
Input [1]: [D_DATE_SK#24]
Arguments: hashpartitioning(d_date_sk#24, 5), ENSURE_REQUIREMENTS, [id=#204]

(9) Sort [codegen id : 4]
Input [1]: [D_DATE_SK#24]
Arguments: [d_date_sk#24 ASC NULLS FIRST], false, 0

(10) SortMergeJoin [codegen id : 5]
Left keys [1]: [sr_returned_date_sk#4]
Right keys [1]: [d_date_sk#24]
Join condition: None

(11) Project [codegen id : 5]
Output [3]: [SR_CUSTOMER_SK#7, SR_STORE_SK#11, SR_RETURN_AMT#15]
Input [5]: [SR_CUSTOMER_SK#7, SR_STORE_SK#11, SR_RETURN_AMT#15, SR_RETURNED_DATE_SK#4, D_DATE_SK#24]

(12) HashAggregate [codegen id : 5]
Input [3]: [SR_CUSTOMER_SK#7, SR_STORE_SK#11, SR_RETURN_AMT#15]
Keys [2]: [sr_customer_sk#7, sr_store_sk#11]
Functions [1]: [partial_sum(SR_RETURN_AMT#15)]
Aggregate Attributes [2]: [sum#185, isEmpty#186]
Results [4]: [sr_customer_sk#7, sr_store_sk#11, sum#187, isEmpty#188]

(13) Exchange
Input [4]: [sr_customer_sk#7, sr_store_sk#11, sum#187, isEmpty#188]
Arguments: hashpartitioning(sr_customer_sk#7, sr_store_sk#11, 5), ENSURE_REQUIREMENTS, [id=#213]

(14) HashAggregate [codegen id : 6]
Input [4]: [sr_customer_sk#7, sr_store_sk#11, sum#187, isEmpty#188]
Keys [2]: [sr_customer_sk#7, sr_store_sk#11]
Functions [1]: [sum(SR_RETURN_AMT#15)]
Aggregate Attributes [1]: [sum(SR_RETURN_AMT#15)#99]
Results [3]: [sr_customer_sk#7 AS ctr_customer_sk#1, sr_store_sk#11 AS ctr_store_sk#2, sum(SR_RETURN_AMT#15)#99 AS ctr_total_return#3]

(15) Filter [codegen id : 6]
Input [3]: [ctr_customer_sk#1, ctr_store_sk#2, ctr_total_return#3]
Condition : isnotnull(ctr_total_return#3)

(16) Exchange
Input [3]: [ctr_customer_sk#1, ctr_store_sk#2, ctr_total_return#3]
Arguments: hashpartitioning(ctr_store_sk#2, 5), ENSURE_REQUIREMENTS, [id=#218]

(17) Sort [codegen id : 7]
Input [3]: [ctr_customer_sk#1, ctr_store_sk#2, ctr_total_return#3]
Arguments: [ctr_store_sk#2 ASC NULLS FIRST], false, 0

(18) BatchScan
Output [4]: [SR_CUSTOMER_SK#103, SR_STORE_SK#107, SR_RETURN_AMT#111, SR_RETURNED_DATE_SK#100]
Format: orafile
OraPlan: 00 OraTableScan TPCDS.STORE_RETURNS, [SR_CUSTOMER_SK#153, SR_STORE_SK#154, SR_RETURN_AMT#155, SR_RETURNED_DATE_SK#156], [oracolumnref(SR_CUSTOMER_SK#153), oracolumnref(SR_STORE_SK#154), oracolumnref(SR_RETURN_AMT#155), oracolumnref(SR_RETURNED_DATE_SK#156)], orapostfixunaryopexpression(isnotnull(SR_STORE_SK#107))
PartitionSchema: struct<SR_RETURNED_DATE_SK:decimal(38,18)>
ReadSchema: struct<SR_CUSTOMER_SK:decimal(38,18),SR_STORE_SK:decimal(38,18),SR_RETURN_AMT:decimal(38,18)>
dsKey: DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
oraPushdownSQL: select "SR_CUSTOMER_SK", "SR_STORE_SK", "SR_RETURN_AMT", "SR_RETURNED_DATE_SK"
from TPCDS.STORE_RETURNS
where "SR_STORE_SK" IS NOT NULL and ("SR_RETURNED_DATE_SK" IS NOT NULL AND "SR_RETURNED_DATE_SK" IS NOT NULL)

(19) Filter [codegen id : 8]
Input [4]: [SR_CUSTOMER_SK#103, SR_STORE_SK#107, SR_RETURN_AMT#111, SR_RETURNED_DATE_SK#100]
Condition : isnotnull(sr_store_sk#107)

(20) Exchange
Input [4]: [SR_CUSTOMER_SK#103, SR_STORE_SK#107, SR_RETURN_AMT#111, SR_RETURNED_DATE_SK#100]
Arguments: hashpartitioning(sr_returned_date_sk#100, 5), ENSURE_REQUIREMENTS, [id=#226]

(21) Sort [codegen id : 9]
Input [4]: [SR_CUSTOMER_SK#103, SR_STORE_SK#107, SR_RETURN_AMT#111, SR_RETURNED_DATE_SK#100]
Arguments: [sr_returned_date_sk#100 ASC NULLS FIRST], false, 0

(22) BatchScan
Output [2]: [D_DATE_SK#120, D_YEAR#126]
Format: orafile
OraPlan: 00 OraTableScan TPCDS.DATE_DIM, [D_DATE_SK#161, D_YEAR#162], [oracolumnref(D_DATE_SK#161), oracolumnref(D_YEAR#162)], orabinaryopexpression((isnotnull(D_YEAR#126) AND (D_YEAR#126 = 2000.000000000000000000)))
PartitionSchema: struct<>
ReadSchema: struct<D_DATE_SK:decimal(38,18),D_YEAR:decimal(38,18)>
dsKey: DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
oraPushdownBindValues: 2000.000000000000000000
oraPushdownSQL: select "D_DATE_SK", "D_YEAR"
from TPCDS.DATE_DIM
where ("D_YEAR" IS NOT NULL AND ("D_YEAR" = ?))

(23) Filter [codegen id : 10]
Input [2]: [D_DATE_SK#120, D_YEAR#126]
Condition : (isnotnull(D_YEAR#126) AND (D_YEAR#126 = 2000.000000000000000000))

(24) Project [codegen id : 10]
Output [1]: [D_DATE_SK#120]
Input [2]: [D_DATE_SK#120, D_YEAR#126]

(25) Exchange
Input [1]: [D_DATE_SK#120]
Arguments: hashpartitioning(d_date_sk#120, 5), ENSURE_REQUIREMENTS, [id=#235]

(26) Sort [codegen id : 11]
Input [1]: [D_DATE_SK#120]
Arguments: [d_date_sk#120 ASC NULLS FIRST], false, 0

(27) SortMergeJoin [codegen id : 12]
Left keys [1]: [sr_returned_date_sk#100]
Right keys [1]: [d_date_sk#120]
Join condition: None

(28) Project [codegen id : 12]
Output [3]: [SR_CUSTOMER_SK#103, SR_STORE_SK#107, SR_RETURN_AMT#111]
Input [5]: [SR_CUSTOMER_SK#103, SR_STORE_SK#107, SR_RETURN_AMT#111, SR_RETURNED_DATE_SK#100, D_DATE_SK#120]

(29) HashAggregate [codegen id : 12]
Input [3]: [SR_CUSTOMER_SK#103, SR_STORE_SK#107, SR_RETURN_AMT#111]
Keys [2]: [sr_customer_sk#103, sr_store_sk#107]
Functions [1]: [partial_sum(SR_RETURN_AMT#111)]
Aggregate Attributes [2]: [sum#193, isEmpty#194]
Results [4]: [sr_customer_sk#103, sr_store_sk#107, sum#195, isEmpty#196]

(30) Exchange
Input [4]: [sr_customer_sk#103, sr_store_sk#107, sum#195, isEmpty#196]
Arguments: hashpartitioning(sr_customer_sk#103, sr_store_sk#107, 5), ENSURE_REQUIREMENTS, [id=#244]

(31) HashAggregate [codegen id : 13]
Input [4]: [sr_customer_sk#103, sr_store_sk#107, sum#195, isEmpty#196]
Keys [2]: [sr_customer_sk#103, sr_store_sk#107]
Functions [1]: [sum(SR_RETURN_AMT#111)]
Aggregate Attributes [1]: [sum(SR_RETURN_AMT#111)#148]
Results [2]: [sr_store_sk#107 AS ctr_store_sk#2, sum(SR_RETURN_AMT#111)#148 AS ctr_total_return#3]

(32) HashAggregate [codegen id : 13]
Input [2]: [ctr_store_sk#2, ctr_total_return#3]
Keys [1]: [ctr_store_sk#2]
Functions [1]: [partial_avg(ctr_total_return#3)]
Aggregate Attributes [2]: [sum#189, count#190L]
Results [3]: [ctr_store_sk#2, sum#191, count#192L]

(33) Exchange
Input [3]: [ctr_store_sk#2, sum#191, count#192L]
Arguments: hashpartitioning(ctr_store_sk#2, 5), ENSURE_REQUIREMENTS, [id=#249]

(34) HashAggregate [codegen id : 14]
Input [3]: [ctr_store_sk#2, sum#191, count#192L]
Keys [1]: [ctr_store_sk#2]
Functions [1]: [avg(ctr_total_return#3)]
Aggregate Attributes [1]: [avg(ctr_total_return#3)#149]
Results [2]: [CheckOverflow((promote_precision(avg(ctr_total_return#3)#149) * 1.2000000000000000000000), DecimalType(38,20), true) AS (CAST(avg(ctr_total_return) AS DECIMAL(38,22)) * CAST(1.2 AS DECIMAL(38,22)))#150, ctr_store_sk#2 AS ctr_store_sk#2#152]

(35) Filter [codegen id : 14]
Input [2]: [(CAST(avg(ctr_total_return) AS DECIMAL(38,22)) * CAST(1.2 AS DECIMAL(38,22)))#150, ctr_store_sk#2#152]
Condition : isnotnull((CAST(avg(ctr_total_return) AS DECIMAL(38,22)) * CAST(1.2 AS DECIMAL(38,22)))#150)

(36) Sort [codegen id : 14]
Input [2]: [(CAST(avg(ctr_total_return) AS DECIMAL(38,22)) * CAST(1.2 AS DECIMAL(38,22)))#150, ctr_store_sk#2#152]
Arguments: [ctr_store_sk#2#152 ASC NULLS FIRST], false, 0

(37) SortMergeJoin [codegen id : 15]
Left keys [1]: [ctr_store_sk#2]
Right keys [1]: [ctr_store_sk#2#152]
Join condition: (cast(ctr_total_return#3 as decimal(38,20)) > (CAST(avg(ctr_total_return) AS DECIMAL(38,22)) * CAST(1.2 AS DECIMAL(38,22)))#150)

(38) Project [codegen id : 15]
Output [2]: [ctr_customer_sk#1, ctr_store_sk#2]
Input [5]: [ctr_customer_sk#1, ctr_store_sk#2, ctr_total_return#3, (CAST(avg(ctr_total_return) AS DECIMAL(38,22)) * CAST(1.2 AS DECIMAL(38,22)))#150, ctr_store_sk#2#152]

(39) BatchScan
Output [2]: [S_STORE_SK#52, S_STATE#76]
Format: orafile
OraPlan: 00 OraTableScan TPCDS.STORE, [S_STORE_SK#177, S_STATE#178], [oracolumnref(S_STORE_SK#177), oracolumnref(S_STATE#178)], orabinaryopexpression((isnotnull(S_STATE#76) AND (S_STATE#76 = TN)))
PartitionSchema: struct<>
ReadSchema: struct<S_STORE_SK:decimal(38,18),S_STATE:string>
dsKey: DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
oraPushdownBindValues: TN
oraPushdownSQL: select "S_STORE_SK", "S_STATE"
from TPCDS.STORE
where ("S_STATE" IS NOT NULL AND ("S_STATE" = ?))

(40) Filter [codegen id : 16]
Input [2]: [S_STORE_SK#52, S_STATE#76]
Condition : (isnotnull(S_STATE#76) AND (S_STATE#76 = TN))

(41) Project [codegen id : 16]
Output [1]: [S_STORE_SK#52]
Input [2]: [S_STORE_SK#52, S_STATE#76]

(42) Exchange
Input [1]: [S_STORE_SK#52]
Arguments: hashpartitioning(s_store_sk#52, 5), ENSURE_REQUIREMENTS, [id=#264]

(43) Sort [codegen id : 17]
Input [1]: [S_STORE_SK#52]
Arguments: [s_store_sk#52 ASC NULLS FIRST], false, 0

(44) SortMergeJoin [codegen id : 18]
Left keys [1]: [ctr_store_sk#2]
Right keys [1]: [s_store_sk#52]
Join condition: None

(45) Project [codegen id : 18]
Output [1]: [ctr_customer_sk#1]
Input [3]: [ctr_customer_sk#1, ctr_store_sk#2, S_STORE_SK#52]

(46) Exchange
Input [1]: [ctr_customer_sk#1]
Arguments: hashpartitioning(ctr_customer_sk#1, 5), ENSURE_REQUIREMENTS, [id=#272]

(47) Sort [codegen id : 19]
Input [1]: [ctr_customer_sk#1]
Arguments: [ctr_customer_sk#1 ASC NULLS FIRST], false, 0

(48) BatchScan
Output [2]: [C_CUSTOMER_SK#81, C_CUSTOMER_ID#82]
Format: orafile
OraPlan: 00 OraTableScan TPCDS.CUSTOMER, [C_CUSTOMER_SK#181, C_CUSTOMER_ID#182], [oracolumnref(C_CUSTOMER_SK#181), oracolumnref(C_CUSTOMER_ID#182)]
PartitionSchema: struct<>
ReadSchema: struct<C_CUSTOMER_SK:decimal(38,18),C_CUSTOMER_ID:string>
dsKey: DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
oraPushdownSQL: select "C_CUSTOMER_SK", "C_CUSTOMER_ID"
from TPCDS.CUSTOMER

(49) Project [codegen id : 20]
Output [2]: [C_CUSTOMER_SK#81, C_CUSTOMER_ID#82]
Input [2]: [C_CUSTOMER_SK#81, C_CUSTOMER_ID#82]

(50) Exchange
Input [2]: [C_CUSTOMER_SK#81, C_CUSTOMER_ID#82]
Arguments: hashpartitioning(c_customer_sk#81, 5), ENSURE_REQUIREMENTS, [id=#280]

(51) Sort [codegen id : 21]
Input [2]: [C_CUSTOMER_SK#81, C_CUSTOMER_ID#82]
Arguments: [c_customer_sk#81 ASC NULLS FIRST], false, 0

(52) SortMergeJoin [codegen id : 22]
Left keys [1]: [ctr_customer_sk#1]
Right keys [1]: [c_customer_sk#81]
Join condition: None

(53) Project [codegen id : 22]
Output [1]: [c_customer_id#82]
Input [3]: [ctr_customer_sk#1, C_CUSTOMER_SK#81, C_CUSTOMER_ID#82]

(54) TakeOrderedAndProject
Input [1]: [c_customer_id#82]
Arguments: 100, [c_customer_id#82 ASC NULLS FIRST], [c_customer_id#82]


Query q2

Spark SQL

  with wscs as
 (select sold_date_sk
        ,sales_price
  from  (select ws_sold_date_sk sold_date_sk
              ,ws_ext_sales_price sales_price
        from web_sales
        union all
        select cs_sold_date_sk sold_date_sk
              ,cs_ext_sales_price sales_price
        from catalog_sales) x ),
 wswscs as
 (select d_week_seq,
        sum(case when (trim(TRAILING from d_day_name)='Sunday') then sales_price else null end) sun_sales,
        sum(case when (trim(TRAILING from d_day_name)='Monday') then sales_price else null end) mon_sales,
        sum(case when (trim(TRAILING from d_day_name)='Tuesday') then sales_price else  null end) tue_sales,
        sum(case when (trim(TRAILING from d_day_name)='Wednesday') then sales_price else null end) wed_sales,
        sum(case when (trim(TRAILING from d_day_name)='Thursday') then sales_price else null end) thu_sales,
        sum(case when (trim(TRAILING from d_day_name)='Friday') then sales_price else null end) fri_sales,
        sum(case when (trim(TRAILING from d_day_name)='Saturday') then sales_price else null end) sat_sales
 from wscs
     ,date_dim
 where d_date_sk = sold_date_sk
 group by d_week_seq)
 select d_week_seq1
       ,round(sun_sales1/sun_sales2,2)
       ,round(mon_sales1/mon_sales2,2)
       ,round(tue_sales1/tue_sales2,2)
       ,round(wed_sales1/wed_sales2,2)
       ,round(thu_sales1/thu_sales2,2)
       ,round(fri_sales1/fri_sales2,2)
       ,round(sat_sales1/sat_sales2,2)
 from
 (select wswscs.d_week_seq d_week_seq1
        ,sun_sales sun_sales1
        ,mon_sales mon_sales1
        ,tue_sales tue_sales1
        ,wed_sales wed_sales1
        ,thu_sales thu_sales1
        ,fri_sales fri_sales1
        ,sat_sales sat_sales1
  from wswscs,date_dim
  where date_dim.d_week_seq = wswscs.d_week_seq and
        d_year = 2001) y,
 (select wswscs.d_week_seq d_week_seq2
        ,sun_sales sun_sales2
        ,mon_sales mon_sales2
        ,tue_sales tue_sales2
        ,wed_sales wed_sales2
        ,thu_sales thu_sales2
        ,fri_sales fri_sales2
        ,sat_sales sat_sales2
  from wswscs
      ,date_dim
  where date_dim.d_week_seq = wswscs.d_week_seq and
        d_year = 2001+1) z
 where d_week_seq1=d_week_seq2-53
 order by d_week_seq1;
  

Spark Plan with Pushdown turned on

Sort (1)
+- Project (2)
   +- BatchScan (3)

(3) BatchScan
Oracle Instance:
   DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
Pushdown Oracle SQL:
select "d_week_seq1", "sun_sales1", "mon_sales1", "tue_sales1", "wed_sales1", "thu_sales1", "fri_sales1", "sat_sales1", "d_week_seq2", "sun_sales2", "mon_sales2", "tue_sales2", "wed_sales2", "thu_sales2", "fri_sales2", "sat_sales2"
from ( select "sparkora_0"."D_WEEK_SEQ" AS "d_week_seq1", "sun_sales" AS "sun_sales1", "mon_sales" AS "mon_sales1", "tue_sales" AS "tue_sales1", "wed_sales" AS "wed_sales1", "thu_sales" AS "thu_sales1", "fri_sales" AS "fri_sales1", "sat_sales" AS "sat_sales1"
from ( select "D_WEEK_SEQ", SUM(CASE WHEN (TRIM(TRAILING  FROM "D_DAY_NAME") = 'Sunday') THEN "sales_price" ELSE null END) AS "sun_sales", SUM(CASE WHEN (TRIM(TRAILING  FROM "D_DAY_NAME") = 'Monday') THEN "sales_price" ELSE null END) AS "mon_sales", SUM(CASE WHEN (TRIM(TRAILING  FROM "D_DAY_NAME") = 'Tuesday') THEN "sales_price" ELSE null END) AS "tue_sales", SUM(CASE WHEN (TRIM(TRAILING  FROM "D_DAY_NAME") = 'Wednesday') THEN "sales_price" ELSE null END) AS "wed_sales", SUM(CASE WHEN (TRIM(TRAILING  FROM "D_DAY_NAME") = 'Thursday') THEN "sales_price" ELSE null END) AS "thu_sales", SUM(CASE WHEN (TRIM(TRAILING  FROM "D_DAY_NAME") = 'Friday') THEN "sales_price" ELSE null END) AS "fri_sales", SUM(CASE WHEN (TRIM(TRAILING  FROM "D_DAY_NAME") = 'Saturday') THEN "sales_price" ELSE null END) AS "sat_sales"
from ( select "WS_SOLD_DATE_SK" AS "sold_date_sk", "WS_EXT_SALES_PRICE" AS "sales_price"
from TPCDS.WEB_SALES 
where "WS_SOLD_DATE_SK" IS NOT NULL UNION ALL select "CS_SOLD_DATE_SK" AS "sold_date_sk", "CS_EXT_SALES_PRICE" AS "sales_price"
from TPCDS.CATALOG_SALES 
where "CS_SOLD_DATE_SK" IS NOT NULL )  join TPCDS.DATE_DIM  on ("sold_date_sk" = "D_DATE_SK")
where "D_WEEK_SEQ" IS NOT NULL
group by "D_WEEK_SEQ" ) "sparkora_0" join TPCDS.DATE_DIM "sparkora_1" on ("sparkora_0"."D_WEEK_SEQ" = "sparkora_1"."D_WEEK_SEQ")
where (("D_YEAR" IS NOT NULL AND ("D_YEAR" = 2001.000000000000000000)) AND "sparkora_1"."D_WEEK_SEQ" IS NOT NULL) )  join ( select "sparkora_0"."D_WEEK_SEQ" AS "d_week_seq2", "sun_sales" AS "sun_sales2", "mon_sales" AS "mon_sales2", "tue_sales" AS "tue_sales2", "wed_sales" AS "wed_sales2", "thu_sales" AS "thu_sales2", "fri_sales" AS "fri_sales2", "sat_sales" AS "sat_sales2"
from ( select "D_WEEK_SEQ", SUM(CASE WHEN (TRIM(TRAILING  FROM "D_DAY_NAME") = 'Sunday') THEN "sales_price" ELSE null END) AS "sun_sales", SUM(CASE WHEN (TRIM(TRAILING  FROM "D_DAY_NAME") = 'Monday') THEN "sales_price" ELSE null END) AS "mon_sales", SUM(CASE WHEN (TRIM(TRAILING  FROM "D_DAY_NAME") = 'Tuesday') THEN "sales_price" ELSE null END) AS "tue_sales", SUM(CASE WHEN (TRIM(TRAILING  FROM "D_DAY_NAME") = 'Wednesday') THEN "sales_price" ELSE null END) AS "wed_sales", SUM(CASE WHEN (TRIM(TRAILING  FROM "D_DAY_NAME") = 'Thursday') THEN "sales_price" ELSE null END) AS "thu_sales", SUM(CASE WHEN (TRIM(TRAILING  FROM "D_DAY_NAME") = 'Friday') THEN "sales_price" ELSE null END) AS "fri_sales", SUM(CASE WHEN (TRIM(TRAILING  FROM "D_DAY_NAME") = 'Saturday') THEN "sales_price" ELSE null END) AS "sat_sales"
from ( select "WS_SOLD_DATE_SK" AS "sold_date_sk", "WS_EXT_SALES_PRICE" AS "sales_price"
from TPCDS.WEB_SALES 
where "WS_SOLD_DATE_SK" IS NOT NULL UNION ALL select "CS_SOLD_DATE_SK" AS "sold_date_sk", "CS_EXT_SALES_PRICE" AS "sales_price"
from TPCDS.CATALOG_SALES 
where "CS_SOLD_DATE_SK" IS NOT NULL )  join TPCDS.DATE_DIM  on ("sold_date_sk" = "D_DATE_SK")
where "D_WEEK_SEQ" IS NOT NULL
group by "D_WEEK_SEQ" ) "sparkora_0" join TPCDS.DATE_DIM "sparkora_1" on ("sparkora_0"."D_WEEK_SEQ" = "sparkora_1"."D_WEEK_SEQ")
where (("D_YEAR" IS NOT NULL AND ("D_YEAR" = 2002.000000000000000000)) AND "sparkora_1"."D_WEEK_SEQ" IS NOT NULL) )  on ("d_week_seq1" = cast((cast("d_week_seq2" as NUMBER(38, 17)) - 53.00000000000000000) as NUMBER(38, 18)))
Pushdown Oracle SQL, oracle plan stats estimates:
rowCount = 13, bytes=2938
Pushdown Oracle SQL, Query Splitting details:
Query is not split

Spark Plan with Pushdown turned off

== Physical Plan ==
* Sort (54)
+- Exchange (53)
   +- * Project (52)
      +- * SortMergeJoin Inner (51)
         :- * Project (24)
         :  +- * SortMergeJoin Inner (23)
         :     :- * Sort (17)
         :     :  +- * HashAggregate (16)
         :     :     +- Exchange (15)
         :     :        +- * HashAggregate (14)
         :     :           +- * Project (13)
         :     :              +- * SortMergeJoin Inner (12)
         :     :                 :- * Sort (7)
         :     :                 :  +- Exchange (6)
         :     :                 :     +- Union (5)
         :     :                 :        :- * Project (2)
         :     :                 :        :  +- BatchScan (1)
         :     :                 :        +- * Project (4)
         :     :                 :           +- BatchScan (3)
         :     :                 +- * Sort (11)
         :     :                    +- Exchange (10)
         :     :                       +- * Filter (9)
         :     :                          +- BatchScan (8)
         :     +- * Sort (22)
         :        +- Exchange (21)
         :           +- * Project (20)
         :              +- * Filter (19)
         :                 +- BatchScan (18)
         +- * Sort (50)
            +- Exchange (49)
               +- * Project (48)
                  +- * SortMergeJoin Inner (47)
                     :- * Sort (41)
                     :  +- * HashAggregate (40)
                     :     +- Exchange (39)
                     :        +- * HashAggregate (38)
                     :           +- * Project (37)
                     :              +- * SortMergeJoin Inner (36)
                     :                 :- * Sort (31)
                     :                 :  +- Exchange (30)
                     :                 :     +- Union (29)
                     :                 :        :- * Project (26)
                     :                 :        :  +- BatchScan (25)
                     :                 :        +- * Project (28)
                     :                 :           +- BatchScan (27)
                     :                 +- * Sort (35)
                     :                    +- Exchange (34)
                     :                       +- * Filter (33)
                     :                          +- BatchScan (32)
                     +- * Sort (46)
                        +- Exchange (45)
                           +- * Project (44)
                              +- * Filter (43)
                                 +- BatchScan (42)


(1) BatchScan
Output [2]: [WS_EXT_SALES_PRICE#443, WS_SOLD_DATE_SK#420]
Format: orafile
OraPlan: 00 OraTableScan TPCDS.WEB_SALES, [WS_EXT_SALES_PRICE#697, WS_SOLD_DATE_SK#698], [oracolumnref(WS_EXT_SALES_PRICE#697), oracolumnref(WS_SOLD_DATE_SK#698)]
PartitionSchema: struct<WS_SOLD_DATE_SK:decimal(38,18)>
ReadSchema: struct<WS_EXT_SALES_PRICE:decimal(38,18)>
dsKey: DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
oraPushdownSQL: select "WS_EXT_SALES_PRICE", "WS_SOLD_DATE_SK"
from TPCDS.WEB_SALES
where "WS_SOLD_DATE_SK" IS NOT NULL

(2) Project [codegen id : 1]
Output [2]: [WS_SOLD_DATE_SK#420 AS sold_date_sk#409, WS_EXT_SALES_PRICE#443 AS sales_price#410]
Input [2]: [WS_EXT_SALES_PRICE#443, WS_SOLD_DATE_SK#420]

(3) BatchScan
Output [2]: [CS_EXT_SALES_PRICE#477, CS_SOLD_DATE_SK#454]
Format: orafile
OraPlan: 00 OraTableScan TPCDS.CATALOG_SALES, [CS_EXT_SALES_PRICE#701, CS_SOLD_DATE_SK#702], [oracolumnref(CS_EXT_SALES_PRICE#701), oracolumnref(CS_SOLD_DATE_SK#702)]
PartitionSchema: struct<CS_SOLD_DATE_SK:decimal(38,18)>
ReadSchema: struct<CS_EXT_SALES_PRICE:decimal(38,18)>
dsKey: DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
oraPushdownSQL: select "CS_EXT_SALES_PRICE", "CS_SOLD_DATE_SK"
from TPCDS.CATALOG_SALES
where "CS_SOLD_DATE_SK" IS NOT NULL

(4) Project [codegen id : 2]
Output [2]: [CS_SOLD_DATE_SK#454 AS sold_date_sk#411, CS_EXT_SALES_PRICE#477 AS sales_price#412]
Input [2]: [CS_EXT_SALES_PRICE#477, CS_SOLD_DATE_SK#454]

(5) Union

(6) Exchange
Input [2]: [sold_date_sk#409, sales_price#410]
Arguments: hashpartitioning(sold_date_sk#409, 5), ENSURE_REQUIREMENTS, [id=#549]

(7) Sort [codegen id : 3]
Input [2]: [sold_date_sk#409, sales_price#410]
Arguments: [sold_date_sk#409 ASC NULLS FIRST], false, 0

(8) BatchScan
Output [3]: [D_DATE_SK#488, D_WEEK_SEQ#492, D_DAY_NAME#502]
Format: orafile
OraPlan: 00 OraTableScan TPCDS.DATE_DIM, [D_DATE_SK#705, D_WEEK_SEQ#706, D_DAY_NAME#707], [oracolumnref(D_DATE_SK#705), oracolumnref(D_WEEK_SEQ#706), oracolumnref(D_DAY_NAME#707)], orapostfixunaryopexpression(isnotnull(D_WEEK_SEQ#492))
PartitionSchema: struct<>
ReadSchema: struct<D_DATE_SK:decimal(38,18),D_WEEK_SEQ:decimal(38,18),D_DAY_NAME:string>
dsKey: DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
oraPushdownSQL: select "D_DATE_SK", "D_WEEK_SEQ", "D_DAY_NAME"
from TPCDS.DATE_DIM
where "D_WEEK_SEQ" IS NOT NULL

(9) Filter [codegen id : 4]
Input [3]: [D_DATE_SK#488, D_WEEK_SEQ#492, D_DAY_NAME#502]
Condition : isnotnull(D_WEEK_SEQ#492)

(10) Exchange
Input [3]: [D_DATE_SK#488, D_WEEK_SEQ#492, D_DAY_NAME#502]
Arguments: hashpartitioning(d_date_sk#488, 5), ENSURE_REQUIREMENTS, [id=#557]

(11) Sort [codegen id : 5]
Input [3]: [D_DATE_SK#488, D_WEEK_SEQ#492, D_DAY_NAME#502]
Arguments: [d_date_sk#488 ASC NULLS FIRST], false, 0

(12) SortMergeJoin [codegen id : 6]
Left keys [1]: [sold_date_sk#409]
Right keys [1]: [d_date_sk#488]
Join condition: None

(13) Project [codegen id : 6]
Output [3]: [sales_price#410, D_WEEK_SEQ#492, D_DAY_NAME#502]
Input [5]: [sold_date_sk#409, sales_price#410, D_DATE_SK#488, D_WEEK_SEQ#492, D_DAY_NAME#502]

(14) HashAggregate [codegen id : 6]
Input [3]: [sales_price#410, D_WEEK_SEQ#492, D_DAY_NAME#502]
Keys [1]: [d_week_seq#492]
Functions [7]: [partial_sum(CASE WHEN (rtrim(d_day_name#502, None) = Sunday) THEN sales_price#410 ELSE null END), partial_sum(CASE WHEN (rtrim(d_day_name#502, None) = Monday) THEN sales_price#410 ELSE null END), partial_sum(CASE WHEN (rtrim(d_day_name#502, None) = Tuesday) THEN sales_price#410 ELSE null END), partial_sum(CASE WHEN (rtrim(d_day_name#502, None) = Wednesday) THEN sales_price#410 ELSE null END), partial_sum(CASE WHEN (rtrim(d_day_name#502, None) = Thursday) THEN sales_price#410 ELSE null END), partial_sum(CASE WHEN (rtrim(d_day_name#502, None) = Friday) THEN sales_price#410 ELSE null END), partial_sum(CASE WHEN (rtrim(d_day_name#502, None) = Saturday) THEN sales_price#410 ELSE null END)]
Aggregate Attributes [14]: [sum#733, isEmpty#734, sum#735, isEmpty#736, sum#737, isEmpty#738, sum#739, isEmpty#740, sum#741, isEmpty#742, sum#743, isEmpty#744, sum#745, isEmpty#746]
Results [15]: [d_week_seq#492, sum#747, isEmpty#748, sum#749, isEmpty#750, sum#751, isEmpty#752, sum#753, isEmpty#754, sum#755, isEmpty#756, sum#757, isEmpty#758, sum#759, isEmpty#760]

(15) Exchange
Input [15]: [d_week_seq#492, sum#747, isEmpty#748, sum#749, isEmpty#750, sum#751, isEmpty#752, sum#753, isEmpty#754, sum#755, isEmpty#756, sum#757, isEmpty#758, sum#759, isEmpty#760]
Arguments: hashpartitioning(d_week_seq#492, 5), ENSURE_REQUIREMENTS, [id=#566]

(16) HashAggregate [codegen id : 7]
Input [15]: [d_week_seq#492, sum#747, isEmpty#748, sum#749, isEmpty#750, sum#751, isEmpty#752, sum#753, isEmpty#754, sum#755, isEmpty#756, sum#757, isEmpty#758, sum#759, isEmpty#760]
Keys [1]: [d_week_seq#492]
Functions [7]: [sum(CASE WHEN (rtrim(d_day_name#502, None) = Sunday) THEN sales_price#410 ELSE null END), sum(CASE WHEN (rtrim(d_day_name#502, None) = Monday) THEN sales_price#410 ELSE null END), sum(CASE WHEN (rtrim(d_day_name#502, None) = Tuesday) THEN sales_price#410 ELSE null END), sum(CASE WHEN (rtrim(d_day_name#502, None) = Wednesday) THEN sales_price#410 ELSE null END), sum(CASE WHEN (rtrim(d_day_name#502, None) = Thursday) THEN sales_price#410 ELSE null END), sum(CASE WHEN (rtrim(d_day_name#502, None) = Friday) THEN sales_price#410 ELSE null END), sum(CASE WHEN (rtrim(d_day_name#502, None) = Saturday) THEN sales_price#410 ELSE null END)]
Aggregate Attributes [7]: [sum(CASE WHEN (rtrim(d_day_name#502, None) = Sunday) THEN sales_price#410 ELSE null END)#668, sum(CASE WHEN (rtrim(d_day_name#502, None) = Monday) THEN sales_price#410 ELSE null END)#669, sum(CASE WHEN (rtrim(d_day_name#502, None) = Tuesday) THEN sales_price#410 ELSE null END)#670, sum(CASE WHEN (rtrim(d_day_name#502, None) = Wednesday) THEN sales_price#410 ELSE null END)#671, sum(CASE WHEN (rtrim(d_day_name#502, None) = Thursday) THEN sales_price#410 ELSE null END)#672, sum(CASE WHEN (rtrim(d_day_name#502, None) = Friday) THEN sales_price#410 ELSE null END)#673, sum(CASE WHEN (rtrim(d_day_name#502, None) = Saturday) THEN sales_price#410 ELSE null END)#674]
Results [8]: [d_week_seq#492, sum(CASE WHEN (rtrim(d_day_name#502, None) = Sunday) THEN sales_price#410 ELSE null END)#668 AS sun_sales#413, sum(CASE WHEN (rtrim(d_day_name#502, None) = Monday) THEN sales_price#410 ELSE null END)#669 AS mon_sales#414, sum(CASE WHEN (rtrim(d_day_name#502, None) = Tuesday) THEN sales_price#410 ELSE null END)#670 AS tue_sales#415, sum(CASE WHEN (rtrim(d_day_name#502, None) = Wednesday) THEN sales_price#410 ELSE null END)#671 AS wed_sales#416, sum(CASE WHEN (rtrim(d_day_name#502, None) = Thursday) THEN sales_price#410 ELSE null END)#672 AS thu_sales#417, sum(CASE WHEN (rtrim(d_day_name#502, None) = Friday) THEN sales_price#410 ELSE null END)#673 AS fri_sales#418, sum(CASE WHEN (rtrim(d_day_name#502, None) = Saturday) THEN sales_price#410 ELSE null END)#674 AS sat_sales#419]

(17) Sort [codegen id : 7]
Input [8]: [d_week_seq#492, sun_sales#413, mon_sales#414, tue_sales#415, wed_sales#416, thu_sales#417, fri_sales#418, sat_sales#419]
Arguments: [d_week_seq#492 ASC NULLS FIRST], false, 0

(18) BatchScan
Output [2]: [D_WEEK_SEQ#520, D_YEAR#522]
Format: orafile
OraPlan: 00 OraTableScan TPCDS.DATE_DIM, [D_WEEK_SEQ#711, D_YEAR#712], [oracolumnref(D_WEEK_SEQ#711), oracolumnref(D_YEAR#712)], orabinaryopexpression(((isnotnull(D_YEAR#522) AND (D_YEAR#522 = 2001.000000000000000000)) AND isnotnull(D_WEEK_SEQ#520)))
PartitionSchema: struct<>
ReadSchema: struct<D_WEEK_SEQ:decimal(38,18),D_YEAR:decimal(38,18)>
dsKey: DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
oraPushdownBindValues: 2001.000000000000000000
oraPushdownSQL: select "D_WEEK_SEQ", "D_YEAR"
from TPCDS.DATE_DIM
where (("D_YEAR" IS NOT NULL AND ("D_YEAR" = ?)) AND "D_WEEK_SEQ" IS NOT NULL)

(19) Filter [codegen id : 8]
Input [2]: [D_WEEK_SEQ#520, D_YEAR#522]
Condition : ((isnotnull(D_YEAR#522) AND (D_YEAR#522 = 2001.000000000000000000)) AND isnotnull(D_WEEK_SEQ#520))

(20) Project [codegen id : 8]
Output [1]: [D_WEEK_SEQ#520]
Input [2]: [D_WEEK_SEQ#520, D_YEAR#522]

(21) Exchange
Input [1]: [D_WEEK_SEQ#520]
Arguments: hashpartitioning(d_week_seq#520, 5), ENSURE_REQUIREMENTS, [id=#576]

(22) Sort [codegen id : 9]
Input [1]: [D_WEEK_SEQ#520]
Arguments: [d_week_seq#520 ASC NULLS FIRST], false, 0

(23) SortMergeJoin [codegen id : 10]
Left keys [1]: [d_week_seq#492]
Right keys [1]: [d_week_seq#520]
Join condition: None

(24) Project [codegen id : 10]
Output [8]: [d_week_seq#492 AS d_week_seq1#393, sun_sales#413 AS sun_sales1#394, mon_sales#414 AS mon_sales1#395, tue_sales#415 AS tue_sales1#396, wed_sales#416 AS wed_sales1#397, thu_sales#417 AS thu_sales1#398, fri_sales#418 AS fri_sales1#399, sat_sales#419 AS sat_sales1#400]
Input [9]: [d_week_seq#492, sun_sales#413, mon_sales#414, tue_sales#415, wed_sales#416, thu_sales#417, fri_sales#418, sat_sales#419, D_WEEK_SEQ#520]

(25) BatchScan
Output [2]: [WS_EXT_SALES_PRICE#567, WS_SOLD_DATE_SK#544]
Format: orafile
OraPlan: 00 OraTableScan TPCDS.WEB_SALES, [WS_EXT_SALES_PRICE#715, WS_SOLD_DATE_SK#716], [oracolumnref(WS_EXT_SALES_PRICE#715), oracolumnref(WS_SOLD_DATE_SK#716)]
PartitionSchema: struct<WS_SOLD_DATE_SK:decimal(38,18)>
ReadSchema: struct<WS_EXT_SALES_PRICE:decimal(38,18)>
dsKey: DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
oraPushdownSQL: select "WS_EXT_SALES_PRICE", "WS_SOLD_DATE_SK"
from TPCDS.WEB_SALES
where "WS_SOLD_DATE_SK" IS NOT NULL

(26) Project [codegen id : 11]
Output [2]: [WS_SOLD_DATE_SK#544 AS sold_date_sk#409, WS_EXT_SALES_PRICE#567 AS sales_price#410]
Input [2]: [WS_EXT_SALES_PRICE#567, WS_SOLD_DATE_SK#544]

(27) BatchScan
Output [2]: [CS_EXT_SALES_PRICE#601, CS_SOLD_DATE_SK#578]
Format: orafile
OraPlan: 00 OraTableScan TPCDS.CATALOG_SALES, [CS_EXT_SALES_PRICE#719, CS_SOLD_DATE_SK#720], [oracolumnref(CS_EXT_SALES_PRICE#719), oracolumnref(CS_SOLD_DATE_SK#720)]
PartitionSchema: struct<CS_SOLD_DATE_SK:decimal(38,18)>
ReadSchema: struct<CS_EXT_SALES_PRICE:decimal(38,18)>
dsKey: DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
oraPushdownSQL: select "CS_EXT_SALES_PRICE", "CS_SOLD_DATE_SK"
from TPCDS.CATALOG_SALES
where "CS_SOLD_DATE_SK" IS NOT NULL

(28) Project [codegen id : 12]
Output [2]: [CS_SOLD_DATE_SK#578 AS sold_date_sk#411, CS_EXT_SALES_PRICE#601 AS sales_price#412]
Input [2]: [CS_EXT_SALES_PRICE#601, CS_SOLD_DATE_SK#578]

(29) Union

(30) Exchange
Input [2]: [sold_date_sk#409, sales_price#410]
Arguments: hashpartitioning(sold_date_sk#409, 5), ENSURE_REQUIREMENTS, [id=#592]

(31) Sort [codegen id : 13]
Input [2]: [sold_date_sk#409, sales_price#410]
Arguments: [sold_date_sk#409 ASC NULLS FIRST], false, 0

(32) BatchScan
Output [3]: [D_DATE_SK#612, D_WEEK_SEQ#616, D_DAY_NAME#626]
Format: orafile
OraPlan: 00 OraTableScan TPCDS.DATE_DIM, [D_DATE_SK#723, D_WEEK_SEQ#724, D_DAY_NAME#725], [oracolumnref(D_DATE_SK#723), oracolumnref(D_WEEK_SEQ#724), oracolumnref(D_DAY_NAME#725)], orapostfixunaryopexpression(isnotnull(D_WEEK_SEQ#616))
PartitionSchema: struct<>
ReadSchema: struct<D_DATE_SK:decimal(38,18),D_WEEK_SEQ:decimal(38,18),D_DAY_NAME:string>
dsKey: DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
oraPushdownSQL: select "D_DATE_SK", "D_WEEK_SEQ", "D_DAY_NAME"
from TPCDS.DATE_DIM
where "D_WEEK_SEQ" IS NOT NULL

(33) Filter [codegen id : 14]
Input [3]: [D_DATE_SK#612, D_WEEK_SEQ#616, D_DAY_NAME#626]
Condition : isnotnull(D_WEEK_SEQ#616)

(34) Exchange
Input [3]: [D_DATE_SK#612, D_WEEK_SEQ#616, D_DAY_NAME#626]
Arguments: hashpartitioning(d_date_sk#612, 5), ENSURE_REQUIREMENTS, [id=#600]

(35) Sort [codegen id : 15]
Input [3]: [D_DATE_SK#612, D_WEEK_SEQ#616, D_DAY_NAME#626]
Arguments: [d_date_sk#612 ASC NULLS FIRST], false, 0

(36) SortMergeJoin [codegen id : 16]
Left keys [1]: [sold_date_sk#409]
Right keys [1]: [d_date_sk#612]
Join condition: None

(37) Project [codegen id : 16]
Output [3]: [sales_price#410, D_WEEK_SEQ#616, D_DAY_NAME#626]
Input [5]: [sold_date_sk#409, sales_price#410, D_DATE_SK#612, D_WEEK_SEQ#616, D_DAY_NAME#626]

(38) HashAggregate [codegen id : 16]
Input [3]: [sales_price#410, D_WEEK_SEQ#616, D_DAY_NAME#626]
Keys [1]: [d_week_seq#616]
Functions [7]: [partial_sum(CASE WHEN (rtrim(d_day_name#626, None) = Sunday) THEN sales_price#410 ELSE null END), partial_sum(CASE WHEN (rtrim(d_day_name#626, None) = Monday) THEN sales_price#410 ELSE null END), partial_sum(CASE WHEN (rtrim(d_day_name#626, None) = Tuesday) THEN sales_price#410 ELSE null END), partial_sum(CASE WHEN (rtrim(d_day_name#626, None) = Wednesday) THEN sales_price#410 ELSE null END), partial_sum(CASE WHEN (rtrim(d_day_name#626, None) = Thursday) THEN sales_price#410 ELSE null END), partial_sum(CASE WHEN (rtrim(d_day_name#626, None) = Friday) THEN sales_price#410 ELSE null END), partial_sum(CASE WHEN (rtrim(d_day_name#626, None) = Saturday) THEN sales_price#410 ELSE null END)]
Aggregate Attributes [14]: [sum#761, isEmpty#762, sum#763, isEmpty#764, sum#765, isEmpty#766, sum#767, isEmpty#768, sum#769, isEmpty#770, sum#771, isEmpty#772, sum#773, isEmpty#774]
Results [15]: [d_week_seq#616, sum#775, isEmpty#776, sum#777, isEmpty#778, sum#779, isEmpty#780, sum#781, isEmpty#782, sum#783, isEmpty#784, sum#785, isEmpty#786, sum#787, isEmpty#788]

(39) Exchange
Input [15]: [d_week_seq#616, sum#775, isEmpty#776, sum#777, isEmpty#778, sum#779, isEmpty#780, sum#781, isEmpty#782, sum#783, isEmpty#784, sum#785, isEmpty#786, sum#787, isEmpty#788]
Arguments: hashpartitioning(d_week_seq#616, 5), ENSURE_REQUIREMENTS, [id=#609]

(40) HashAggregate [codegen id : 17]
Input [15]: [d_week_seq#616, sum#775, isEmpty#776, sum#777, isEmpty#778, sum#779, isEmpty#780, sum#781, isEmpty#782, sum#783, isEmpty#784, sum#785, isEmpty#786, sum#787, isEmpty#788]
Keys [1]: [d_week_seq#616]
Functions [7]: [sum(CASE WHEN (rtrim(d_day_name#626, None) = Sunday) THEN sales_price#410 ELSE null END), sum(CASE WHEN (rtrim(d_day_name#626, None) = Monday) THEN sales_price#410 ELSE null END), sum(CASE WHEN (rtrim(d_day_name#626, None) = Tuesday) THEN sales_price#410 ELSE null END), sum(CASE WHEN (rtrim(d_day_name#626, None) = Wednesday) THEN sales_price#410 ELSE null END), sum(CASE WHEN (rtrim(d_day_name#626, None) = Thursday) THEN sales_price#410 ELSE null END), sum(CASE WHEN (rtrim(d_day_name#626, None) = Friday) THEN sales_price#410 ELSE null END), sum(CASE WHEN (rtrim(d_day_name#626, None) = Saturday) THEN sales_price#410 ELSE null END)]
Aggregate Attributes [7]: [sum(CASE WHEN (rtrim(d_day_name#626, None) = Sunday) THEN sales_price#410 ELSE null END)#675, sum(CASE WHEN (rtrim(d_day_name#626, None) = Monday) THEN sales_price#410 ELSE null END)#676, sum(CASE WHEN (rtrim(d_day_name#626, None) = Tuesday) THEN sales_price#410 ELSE null END)#677, sum(CASE WHEN (rtrim(d_day_name#626, None) = Wednesday) THEN sales_price#410 ELSE null END)#678, sum(CASE WHEN (rtrim(d_day_name#626, None) = Thursday) THEN sales_price#410 ELSE null END)#679, sum(CASE WHEN (rtrim(d_day_name#626, None) = Friday) THEN sales_price#410 ELSE null END)#680, sum(CASE WHEN (rtrim(d_day_name#626, None) = Saturday) THEN sales_price#410 ELSE null END)#681]
Results [8]: [d_week_seq#616, sum(CASE WHEN (rtrim(d_day_name#626, None) = Sunday) THEN sales_price#410 ELSE null END)#675 AS sun_sales#413, sum(CASE WHEN (rtrim(d_day_name#626, None) = Monday) THEN sales_price#410 ELSE null END)#676 AS mon_sales#414, sum(CASE WHEN (rtrim(d_day_name#626, None) = Tuesday) THEN sales_price#410 ELSE null END)#677 AS tue_sales#415, sum(CASE WHEN (rtrim(d_day_name#626, None) = Wednesday) THEN sales_price#410 ELSE null END)#678 AS wed_sales#416, sum(CASE WHEN (rtrim(d_day_name#626, None) = Thursday) THEN sales_price#410 ELSE null END)#679 AS thu_sales#417, sum(CASE WHEN (rtrim(d_day_name#626, None) = Friday) THEN sales_price#410 ELSE null END)#680 AS fri_sales#418, sum(CASE WHEN (rtrim(d_day_name#626, None) = Saturday) THEN sales_price#410 ELSE null END)#681 AS sat_sales#419]

(41) Sort [codegen id : 17]
Input [8]: [d_week_seq#616, sun_sales#413, mon_sales#414, tue_sales#415, wed_sales#416, thu_sales#417, fri_sales#418, sat_sales#419]
Arguments: [d_week_seq#616 ASC NULLS FIRST], false, 0

(42) BatchScan
Output [2]: [D_WEEK_SEQ#644, D_YEAR#646]
Format: orafile
OraPlan: 00 OraTableScan TPCDS.DATE_DIM, [D_WEEK_SEQ#729, D_YEAR#730], [oracolumnref(D_WEEK_SEQ#729), oracolumnref(D_YEAR#730)], orabinaryopexpression(((isnotnull(D_YEAR#646) AND (D_YEAR#646 = 2002.000000000000000000)) AND isnotnull(D_WEEK_SEQ#644)))
PartitionSchema: struct<>
ReadSchema: struct<D_WEEK_SEQ:decimal(38,18),D_YEAR:decimal(38,18)>
dsKey: DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
oraPushdownBindValues: 2002.000000000000000000
oraPushdownSQL: select "D_WEEK_SEQ", "D_YEAR"
from TPCDS.DATE_DIM
where (("D_YEAR" IS NOT NULL AND ("D_YEAR" = ?)) AND "D_WEEK_SEQ" IS NOT NULL)

(43) Filter [codegen id : 18]
Input [2]: [D_WEEK_SEQ#644, D_YEAR#646]
Condition : ((isnotnull(D_YEAR#646) AND (D_YEAR#646 = 2002.000000000000000000)) AND isnotnull(D_WEEK_SEQ#644))

(44) Project [codegen id : 18]
Output [1]: [D_WEEK_SEQ#644]
Input [2]: [D_WEEK_SEQ#644, D_YEAR#646]

(45) Exchange
Input [1]: [D_WEEK_SEQ#644]
Arguments: hashpartitioning(d_week_seq#644, 5), ENSURE_REQUIREMENTS, [id=#619]

(46) Sort [codegen id : 19]
Input [1]: [D_WEEK_SEQ#644]
Arguments: [d_week_seq#644 ASC NULLS FIRST], false, 0

(47) SortMergeJoin [codegen id : 20]
Left keys [1]: [d_week_seq#616]
Right keys [1]: [d_week_seq#644]
Join condition: None

(48) Project [codegen id : 20]
Output [8]: [d_week_seq#616 AS d_week_seq2#401, sun_sales#413 AS sun_sales2#402, mon_sales#414 AS mon_sales2#403, tue_sales#415 AS tue_sales2#404, wed_sales#416 AS wed_sales2#405, thu_sales#417 AS thu_sales2#406, fri_sales#418 AS fri_sales2#407, sat_sales#419 AS sat_sales2#408]
Input [9]: [d_week_seq#616, sun_sales#413, mon_sales#414, tue_sales#415, wed_sales#416, thu_sales#417, fri_sales#418, sat_sales#419, D_WEEK_SEQ#644]

(49) Exchange
Input [8]: [d_week_seq2#401, sun_sales2#402, mon_sales2#403, tue_sales2#404, wed_sales2#405, thu_sales2#406, fri_sales2#407, sat_sales2#408]
Arguments: hashpartitioning(cast(CheckOverflow((promote_precision(cast(d_week_seq2#401 as decimal(38,17))) - 53.00000000000000000), DecimalType(38,17), true) as decimal(38,18)), 5), ENSURE_REQUIREMENTS, [id=#627]

(50) Sort [codegen id : 21]
Input [8]: [d_week_seq2#401, sun_sales2#402, mon_sales2#403, tue_sales2#404, wed_sales2#405, thu_sales2#406, fri_sales2#407, sat_sales2#408]
Arguments: [cast(CheckOverflow((promote_precision(cast(d_week_seq2#401 as decimal(38,17))) - 53.00000000000000000), DecimalType(38,17), true) as decimal(38,18)) ASC NULLS FIRST], false, 0

(51) SortMergeJoin [codegen id : 22]
Left keys [1]: [d_week_seq1#393]
Right keys [1]: [cast(CheckOverflow((promote_precision(cast(d_week_seq2#401 as decimal(38,17))) - 53.00000000000000000), DecimalType(38,17), true) as decimal(38,18))]
Join condition: None

(52) Project [codegen id : 22]
Output [8]: [d_week_seq1#393, round(CheckOverflow((promote_precision(sun_sales1#394) / promote_precision(sun_sales2#402)), DecimalType(38,6), true), 2) AS round((sun_sales1 / sun_sales2), 2)#682, round(CheckOverflow((promote_precision(mon_sales1#395) / promote_precision(mon_sales2#403)), DecimalType(38,6), true), 2) AS round((mon_sales1 / mon_sales2), 2)#683, round(CheckOverflow((promote_precision(tue_sales1#396) / promote_precision(tue_sales2#404)), DecimalType(38,6), true), 2) AS round((tue_sales1 / tue_sales2), 2)#684, round(CheckOverflow((promote_precision(wed_sales1#397) / promote_precision(wed_sales2#405)), DecimalType(38,6), true), 2) AS round((wed_sales1 / wed_sales2), 2)#685, round(CheckOverflow((promote_precision(thu_sales1#398) / promote_precision(thu_sales2#406)), DecimalType(38,6), true), 2) AS round((thu_sales1 / thu_sales2), 2)#686, round(CheckOverflow((promote_precision(fri_sales1#399) / promote_precision(fri_sales2#407)), DecimalType(38,6), true), 2) AS round((fri_sales1 / fri_sales2), 2)#687, round(CheckOverflow((promote_precision(sat_sales1#400) / promote_precision(sat_sales2#408)), DecimalType(38,6), true), 2) AS round((sat_sales1 / sat_sales2), 2)#688]
Input [16]: [d_week_seq1#393, sun_sales1#394, mon_sales1#395, tue_sales1#396, wed_sales1#397, thu_sales1#398, fri_sales1#399, sat_sales1#400, d_week_seq2#401, sun_sales2#402, mon_sales2#403, tue_sales2#404, wed_sales2#405, thu_sales2#406, fri_sales2#407, sat_sales2#408]

(53) Exchange
Input [8]: [d_week_seq1#393, round((sun_sales1 / sun_sales2), 2)#682, round((mon_sales1 / mon_sales2), 2)#683, round((tue_sales1 / tue_sales2), 2)#684, round((wed_sales1 / wed_sales2), 2)#685, round((thu_sales1 / thu_sales2), 2)#686, round((fri_sales1 / fri_sales2), 2)#687, round((sat_sales1 / sat_sales2), 2)#688]
Arguments: rangepartitioning(d_week_seq1#393 ASC NULLS FIRST, 5), ENSURE_REQUIREMENTS, [id=#635]

(54) Sort [codegen id : 23]
Input [8]: [d_week_seq1#393, round((sun_sales1 / sun_sales2), 2)#682, round((mon_sales1 / mon_sales2), 2)#683, round((tue_sales1 / tue_sales2), 2)#684, round((wed_sales1 / wed_sales2), 2)#685, round((thu_sales1 / thu_sales2), 2)#686, round((fri_sales1 / fri_sales2), 2)#687, round((sat_sales1 / sat_sales2), 2)#688]
Arguments: [d_week_seq1#393 ASC NULLS FIRST], true, 0


Query q3

Spark SQL

select  dt.d_year
       ,item.i_brand_id brand_id
       ,item.i_brand brand
       ,sum(ss_ext_sales_price) sum_agg
 from  date_dim dt
      ,store_sales
      ,item
 where dt.d_date_sk = store_sales.ss_sold_date_sk
   and store_sales.ss_item_sk = item.i_item_sk
   and item.i_manufact_id = 128
   and dt.d_moy=11
 group by dt.d_year
      ,item.i_brand
      ,item.i_brand_id
 order by dt.d_year
         ,sum_agg desc
         ,brand_id
  limit 100; 

Spark Plan with Pushdown turned on

Project (1)
+- BatchScan (2)

(2) BatchScan
Oracle Instance:
   DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
Pushdown Oracle SQL:
select "D_YEAR", "brand_id", "brand", "sum_agg"
from ( select "D_YEAR", "I_BRAND_ID" AS "brand_id", "I_BRAND" AS "brand", SUM("SS_EXT_SALES_PRICE") AS "sum_agg"
from TPCDS.DATE_DIM  join TPCDS.STORE_SALES  on ("D_DATE_SK" = "SS_SOLD_DATE_SK") join TPCDS.ITEM  on ("SS_ITEM_SK" = "I_ITEM_SK")
where ((("D_MOY" IS NOT NULL AND ("D_MOY" = 11.000000000000000000)) AND "SS_SOLD_DATE_SK" IS NOT NULL) AND ("I_MANUFACT_ID" IS NOT NULL AND ("I_MANUFACT_ID" = 128.000000000000000000)))
group by "D_YEAR", "I_BRAND", "I_BRAND_ID"
order by "D_YEAR" ASC NULLS FIRST, "sum_agg" DESC NULLS LAST, "brand_id" ASC NULLS FIRST ) 
where rownum <= 100
Pushdown Oracle SQL, oracle plan stats estimates:
rowCount = 100, bytes=9100
Pushdown Oracle SQL, Query Splitting details:
Query is not split

Spark Plan with Pushdown turned off

== Physical Plan ==
TakeOrderedAndProject (24)
+- * HashAggregate (23)
   +- Exchange (22)
      +- * HashAggregate (21)
         +- * Project (20)
            +- * SortMergeJoin Inner (19)
               :- * Sort (13)
               :  +- Exchange (12)
               :     +- * Project (11)
               :        +- * SortMergeJoin Inner (10)
               :           :- * Sort (5)
               :           :  +- Exchange (4)
               :           :     +- * Project (3)
               :           :        +- * Filter (2)
               :           :           +- BatchScan (1)
               :           +- * Sort (9)
               :              +- Exchange (8)
               :                 +- * Project (7)
               :                    +- BatchScan (6)
               +- * Sort (18)
                  +- Exchange (17)
                     +- * Project (16)
                        +- * Filter (15)
                           +- BatchScan (14)


(1) BatchScan
Output [3]: [D_DATE_SK#1167, D_YEAR#1173, D_MOY#1175]
Format: orafile
OraPlan: 00 OraTableScan TPCDS.DATE_DIM, [D_DATE_SK#1248, D_YEAR#1249, D_MOY#1250], [oracolumnref(D_DATE_SK#1248), oracolumnref(D_YEAR#1249), oracolumnref(D_MOY#1250)], orabinaryopexpression((isnotnull(D_MOY#1175) AND (D_MOY#1175 = 11.000000000000000000)))
PartitionSchema: struct<>
ReadSchema: struct<D_DATE_SK:decimal(38,18),D_YEAR:decimal(38,18),D_MOY:decimal(38,18)>
dsKey: DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
oraPushdownBindValues: 11.000000000000000000
oraPushdownSQL: select "D_DATE_SK", "D_YEAR", "D_MOY"
from TPCDS.DATE_DIM
where ("D_MOY" IS NOT NULL AND ("D_MOY" = ?))

(2) Filter [codegen id : 1]
Input [3]: [D_DATE_SK#1167, D_YEAR#1173, D_MOY#1175]
Condition : (isnotnull(D_MOY#1175) AND (D_MOY#1175 = 11.000000000000000000))

(3) Project [codegen id : 1]
Output [2]: [D_DATE_SK#1167, D_YEAR#1173]
Input [3]: [D_DATE_SK#1167, D_YEAR#1173, D_MOY#1175]

(4) Exchange
Input [2]: [D_DATE_SK#1167, D_YEAR#1173]
Arguments: hashpartitioning(d_date_sk#1167, 5), ENSURE_REQUIREMENTS, [id=#807]

(5) Sort [codegen id : 2]
Input [2]: [D_DATE_SK#1167, D_YEAR#1173]
Arguments: [d_date_sk#1167 ASC NULLS FIRST], false, 0

(6) BatchScan
Output [3]: [SS_ITEM_SK#1197, SS_EXT_SALES_PRICE#1210, SS_SOLD_DATE_SK#1195]
Format: orafile
OraPlan: 00 OraTableScan TPCDS.STORE_SALES, [SS_ITEM_SK#1254, SS_EXT_SALES_PRICE#1255, SS_SOLD_DATE_SK#1256], [oracolumnref(SS_ITEM_SK#1254), oracolumnref(SS_EXT_SALES_PRICE#1255), oracolumnref(SS_SOLD_DATE_SK#1256)]
PartitionSchema: struct<SS_SOLD_DATE_SK:decimal(38,18)>
ReadSchema: struct<SS_ITEM_SK:decimal(38,18),SS_EXT_SALES_PRICE:decimal(38,18)>
dsKey: DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
oraPushdownSQL: select "SS_ITEM_SK", "SS_EXT_SALES_PRICE", "SS_SOLD_DATE_SK"
from TPCDS.STORE_SALES
where "SS_SOLD_DATE_SK" IS NOT NULL

(7) Project [codegen id : 3]
Output [3]: [SS_SOLD_DATE_SK#1195, SS_ITEM_SK#1197, SS_EXT_SALES_PRICE#1210]
Input [3]: [SS_ITEM_SK#1197, SS_EXT_SALES_PRICE#1210, SS_SOLD_DATE_SK#1195]

(8) Exchange
Input [3]: [SS_SOLD_DATE_SK#1195, SS_ITEM_SK#1197, SS_EXT_SALES_PRICE#1210]
Arguments: hashpartitioning(ss_sold_date_sk#1195, 5), ENSURE_REQUIREMENTS, [id=#815]

(9) Sort [codegen id : 4]
Input [3]: [SS_SOLD_DATE_SK#1195, SS_ITEM_SK#1197, SS_EXT_SALES_PRICE#1210]
Arguments: [ss_sold_date_sk#1195 ASC NULLS FIRST], false, 0

(10) SortMergeJoin [codegen id : 5]
Left keys [1]: [d_date_sk#1167]
Right keys [1]: [ss_sold_date_sk#1195]
Join condition: None

(11) Project [codegen id : 5]
Output [3]: [D_YEAR#1173, SS_ITEM_SK#1197, SS_EXT_SALES_PRICE#1210]
Input [5]: [D_DATE_SK#1167, D_YEAR#1173, SS_SOLD_DATE_SK#1195, SS_ITEM_SK#1197, SS_EXT_SALES_PRICE#1210]

(12) Exchange
Input [3]: [D_YEAR#1173, SS_ITEM_SK#1197, SS_EXT_SALES_PRICE#1210]
Arguments: hashpartitioning(ss_item_sk#1197, 5), ENSURE_REQUIREMENTS, [id=#823]

(13) Sort [codegen id : 6]
Input [3]: [D_YEAR#1173, SS_ITEM_SK#1197, SS_EXT_SALES_PRICE#1210]
Arguments: [ss_item_sk#1197 ASC NULLS FIRST], false, 0

(14) BatchScan
Output [4]: [I_ITEM_SK#1218, I_BRAND_ID#1225, I_BRAND#1226, I_MANUFACT_ID#1231]
Format: orafile
OraPlan: 00 OraTableScan TPCDS.ITEM, [I_ITEM_SK#1260, I_BRAND_ID#1261, I_BRAND#1262, I_MANUFACT_ID#1263], [oracolumnref(I_ITEM_SK#1260), oracolumnref(I_BRAND_ID#1261), oracolumnref(I_BRAND#1262), oracolumnref(I_MANUFACT_ID#1263)], orabinaryopexpression((isnotnull(I_MANUFACT_ID#1231) AND (I_MANUFACT_ID#1231 = 128.000000000000000000)))
PartitionSchema: struct<>
ReadSchema: struct<I_ITEM_SK:decimal(38,18),I_BRAND_ID:decimal(38,18),I_BRAND:string,I_MANUFACT_ID:decimal(38,18)>
dsKey: DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
oraPushdownBindValues: 128.000000000000000000
oraPushdownSQL: select "I_ITEM_SK", "I_BRAND_ID", "I_BRAND", "I_MANUFACT_ID"
from TPCDS.ITEM
where ("I_MANUFACT_ID" IS NOT NULL AND ("I_MANUFACT_ID" = ?))

(15) Filter [codegen id : 7]
Input [4]: [I_ITEM_SK#1218, I_BRAND_ID#1225, I_BRAND#1226, I_MANUFACT_ID#1231]
Condition : (isnotnull(I_MANUFACT_ID#1231) AND (I_MANUFACT_ID#1231 = 128.000000000000000000))

(16) Project [codegen id : 7]
Output [3]: [I_ITEM_SK#1218, I_BRAND_ID#1225, I_BRAND#1226]
Input [4]: [I_ITEM_SK#1218, I_BRAND_ID#1225, I_BRAND#1226, I_MANUFACT_ID#1231]

(17) Exchange
Input [3]: [I_ITEM_SK#1218, I_BRAND_ID#1225, I_BRAND#1226]
Arguments: hashpartitioning(i_item_sk#1218, 5), ENSURE_REQUIREMENTS, [id=#832]

(18) Sort [codegen id : 8]
Input [3]: [I_ITEM_SK#1218, I_BRAND_ID#1225, I_BRAND#1226]
Arguments: [i_item_sk#1218 ASC NULLS FIRST], false, 0

(19) SortMergeJoin [codegen id : 9]
Left keys [1]: [ss_item_sk#1197]
Right keys [1]: [i_item_sk#1218]
Join condition: None

(20) Project [codegen id : 9]
Output [4]: [D_YEAR#1173, SS_EXT_SALES_PRICE#1210, I_BRAND_ID#1225, I_BRAND#1226]
Input [6]: [D_YEAR#1173, SS_ITEM_SK#1197, SS_EXT_SALES_PRICE#1210, I_ITEM_SK#1218, I_BRAND_ID#1225, I_BRAND#1226]

(21) HashAggregate [codegen id : 9]
Input [4]: [D_YEAR#1173, SS_EXT_SALES_PRICE#1210, I_BRAND_ID#1225, I_BRAND#1226]
Keys [3]: [d_year#1173, i_brand#1226, i_brand_id#1225]
Functions [1]: [partial_sum(ss_ext_sales_price#1210)]
Aggregate Attributes [2]: [sum#1268, isEmpty#1269]
Results [5]: [d_year#1173, i_brand#1226, i_brand_id#1225, sum#1270, isEmpty#1271]

(22) Exchange
Input [5]: [d_year#1173, i_brand#1226, i_brand_id#1225, sum#1270, isEmpty#1271]
Arguments: hashpartitioning(d_year#1173, i_brand#1226, i_brand_id#1225, 5), ENSURE_REQUIREMENTS, [id=#841]

(23) HashAggregate [codegen id : 10]
Input [5]: [d_year#1173, i_brand#1226, i_brand_id#1225, sum#1270, isEmpty#1271]
Keys [3]: [d_year#1173, i_brand#1226, i_brand_id#1225]
Functions [1]: [sum(ss_ext_sales_price#1210)]
Aggregate Attributes [1]: [sum(ss_ext_sales_price#1210)#1240]
Results [4]: [d_year#1173, i_brand_id#1225 AS brand_id#1164, i_brand#1226 AS brand#1165, sum(ss_ext_sales_price#1210)#1240 AS sum_agg#1166]

(24) TakeOrderedAndProject
Input [4]: [d_year#1173, brand_id#1164, brand#1165, sum_agg#1166]
Arguments: 100, [d_year#1173 ASC NULLS FIRST, sum_agg#1166 DESC NULLS LAST, brand_id#1164 ASC NULLS FIRST], [d_year#1173, brand_id#1164, brand#1165, sum_agg#1166]


Query q4

Spark SQL

with year_total as (
 select c_customer_id customer_id
       ,c_first_name customer_first_name
       ,c_last_name customer_last_name
       ,c_preferred_cust_flag customer_preferred_cust_flag
       ,c_birth_country customer_birth_country
       ,c_login customer_login
       ,c_email_address customer_email_address
       ,d_year dyear
       ,sum(((ss_ext_list_price-ss_ext_wholesale_cost-ss_ext_discount_amt)+ss_ext_sales_price)/2) year_total
       ,'s' sale_type
 from customer
     ,store_sales
     ,date_dim
 where c_customer_sk = ss_customer_sk
   and ss_sold_date_sk = d_date_sk
 group by c_customer_id
         ,c_first_name
         ,c_last_name
         ,c_preferred_cust_flag
         ,c_birth_country
         ,c_login
         ,c_email_address
         ,d_year
 union all
 select c_customer_id customer_id
       ,c_first_name customer_first_name
       ,c_last_name customer_last_name
       ,c_preferred_cust_flag customer_preferred_cust_flag
       ,c_birth_country customer_birth_country
       ,c_login customer_login
       ,c_email_address customer_email_address
       ,d_year dyear
       ,sum((((cs_ext_list_price-cs_ext_wholesale_cost-cs_ext_discount_amt)+cs_ext_sales_price)/2) ) year_total
       ,'c' sale_type
 from customer
     ,catalog_sales
     ,date_dim
 where c_customer_sk = cs_bill_customer_sk
   and cs_sold_date_sk = d_date_sk
 group by c_customer_id
         ,c_first_name
         ,c_last_name
         ,c_preferred_cust_flag
         ,c_birth_country
         ,c_login
         ,c_email_address
         ,d_year
union all
 select c_customer_id customer_id
       ,c_first_name customer_first_name
       ,c_last_name customer_last_name
       ,c_preferred_cust_flag customer_preferred_cust_flag
       ,c_birth_country customer_birth_country
       ,c_login customer_login
       ,c_email_address customer_email_address
       ,d_year dyear
       ,sum((((ws_ext_list_price-ws_ext_wholesale_cost-ws_ext_discount_amt)+ws_ext_sales_price)/2) ) year_total
       ,'w' sale_type
 from customer
     ,web_sales
     ,date_dim
 where c_customer_sk = ws_bill_customer_sk
   and ws_sold_date_sk = d_date_sk
 group by c_customer_id
         ,c_first_name
         ,c_last_name
         ,c_preferred_cust_flag
         ,c_birth_country
         ,c_login
         ,c_email_address
         ,d_year
         )
  select
                  t_s_secyear.customer_id
                 ,t_s_secyear.customer_first_name
                 ,t_s_secyear.customer_last_name
                 ,t_s_secyear.customer_preferred_cust_flag
 from year_total t_s_firstyear
     ,year_total t_s_secyear
     ,year_total t_c_firstyear
     ,year_total t_c_secyear
     ,year_total t_w_firstyear
     ,year_total t_w_secyear
 where t_s_secyear.customer_id = t_s_firstyear.customer_id
   and t_s_firstyear.customer_id = t_c_secyear.customer_id
   and t_s_firstyear.customer_id = t_c_firstyear.customer_id
   and t_s_firstyear.customer_id = t_w_firstyear.customer_id
   and t_s_firstyear.customer_id = t_w_secyear.customer_id
   and t_s_firstyear.sale_type = 's'
   and t_c_firstyear.sale_type = 'c'
   and t_w_firstyear.sale_type = 'w'
   and t_s_secyear.sale_type = 's'
   and t_c_secyear.sale_type = 'c'
   and t_w_secyear.sale_type = 'w'
   and t_s_firstyear.dyear =  2001
   and t_s_secyear.dyear = 2001+1
   and t_c_firstyear.dyear =  2001
   and t_c_secyear.dyear =  2001+1
   and t_w_firstyear.dyear = 2001
   and t_w_secyear.dyear = 2001+1
   and t_s_firstyear.year_total > 0
   and t_c_firstyear.year_total > 0
   and t_w_firstyear.year_total > 0
   and case when t_c_firstyear.year_total > 0 then t_c_secyear.year_total / t_c_firstyear.year_total else null end
           > case when t_s_firstyear.year_total > 0 then t_s_secyear.year_total / t_s_firstyear.year_total else null end
   and case when t_c_firstyear.year_total > 0 then t_c_secyear.year_total / t_c_firstyear.year_total else null end
           > case when t_w_firstyear.year_total > 0 then t_w_secyear.year_total / t_w_firstyear.year_total else null end
 order by t_s_secyear.customer_id
         ,t_s_secyear.customer_first_name
         ,t_s_secyear.customer_last_name
         ,t_s_secyear.customer_preferred_cust_flag
 limit 100;
 

Spark Plan with Pushdown turned on

Project (1)
+- BatchScan (2)

(2) BatchScan
Oracle Instance:
   DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
Pushdown Oracle SQL:
select "customer_id", "customer_first_name", "customer_last_name", "customer_preferred_cust_flag"
from ( select "sparkora_1"."customer_id", "customer_first_name", "customer_last_name", "customer_preferred_cust_flag"
from ( select "C_CUSTOMER_ID" AS "customer_id", SUM(((cast((cast((cast("SS_EXT_LIST_PRICE" as NUMBER(38, 17)) - cast("SS_EXT_WHOLESALE_COST" as NUMBER(38, 17))) as NUMBER(38, 16)) - cast("SS_EXT_DISCOUNT_AMT" as NUMBER(38, 16))) as NUMBER(38, 15)) + cast("SS_EXT_SALES_PRICE" as NUMBER(38, 15))) / 2.000000000000000)) AS "year_total"
from TPCDS.CUSTOMER  join TPCDS.STORE_SALES  on ("C_CUSTOMER_SK" = "SS_CUSTOMER_SK") join TPCDS.DATE_DIM  on ("SS_SOLD_DATE_SK" = "D_DATE_SK")
where (("SS_CUSTOMER_SK" IS NOT NULL AND "SS_SOLD_DATE_SK" IS NOT NULL) AND ("D_YEAR" IS NOT NULL AND ("D_YEAR" = 2001.000000000000000000)))
group by "C_CUSTOMER_ID", "C_FIRST_NAME", "C_LAST_NAME", "C_PREFERRED_CUST_FLAG", "C_BIRTH_COUNTRY", "C_LOGIN", "C_EMAIL_ADDRESS", "D_YEAR" ) "sparkora_0" join ( select "C_CUSTOMER_ID" AS "customer_id", "C_FIRST_NAME" AS "customer_first_name", "C_LAST_NAME" AS "customer_last_name", "C_PREFERRED_CUST_FLAG" AS "customer_preferred_cust_flag", SUM(((cast((cast((cast("SS_EXT_LIST_PRICE" as NUMBER(38, 17)) - cast("SS_EXT_WHOLESALE_COST" as NUMBER(38, 17))) as NUMBER(38, 16)) - cast("SS_EXT_DISCOUNT_AMT" as NUMBER(38, 16))) as NUMBER(38, 15)) + cast("SS_EXT_SALES_PRICE" as NUMBER(38, 15))) / 2.000000000000000)) AS "year_total"
from TPCDS.CUSTOMER  join TPCDS.STORE_SALES  on ("C_CUSTOMER_SK" = "SS_CUSTOMER_SK") join TPCDS.DATE_DIM  on ("SS_SOLD_DATE_SK" = "D_DATE_SK")
where (("SS_CUSTOMER_SK" IS NOT NULL AND "SS_SOLD_DATE_SK" IS NOT NULL) AND ("D_YEAR" IS NOT NULL AND ("D_YEAR" = 2002.000000000000000000)))
group by "C_CUSTOMER_ID", "C_FIRST_NAME", "C_LAST_NAME", "C_PREFERRED_CUST_FLAG", "C_BIRTH_COUNTRY", "C_LOGIN", "C_EMAIL_ADDRESS", "D_YEAR" ) "sparkora_1" on ("sparkora_0"."customer_id" = "sparkora_1"."customer_id") join ( select "customer_id" AS "customer_id", "year_total" AS "year_total"
from ( select "C_CUSTOMER_ID" AS "customer_id", SUM(((cast((cast((cast("CS_EXT_LIST_PRICE" as NUMBER(38, 17)) - cast("CS_EXT_WHOLESALE_COST" as NUMBER(38, 17))) as NUMBER(38, 16)) - cast("CS_EXT_DISCOUNT_AMT" as NUMBER(38, 16))) as NUMBER(38, 15)) + cast("CS_EXT_SALES_PRICE" as NUMBER(38, 15))) / 2.000000000000000)) AS "year_total"
from TPCDS.CUSTOMER  join TPCDS.CATALOG_SALES  on ("C_CUSTOMER_SK" = "CS_BILL_CUSTOMER_SK") join TPCDS.DATE_DIM  on ("CS_SOLD_DATE_SK" = "D_DATE_SK")
where (("CS_BILL_CUSTOMER_SK" IS NOT NULL AND "CS_SOLD_DATE_SK" IS NOT NULL) AND ("D_YEAR" IS NOT NULL AND ("D_YEAR" = 2001.000000000000000000)))
group by "C_CUSTOMER_ID", "C_FIRST_NAME", "C_LAST_NAME", "C_PREFERRED_CUST_FLAG", "C_BIRTH_COUNTRY", "C_LOGIN", "C_EMAIL_ADDRESS", "D_YEAR" ) 
where ("year_total" IS NOT NULL AND ("year_total" > 0E-15)) ) "sparkora_2" on ("sparkora_0"."customer_id" = "sparkora_2"."customer_id") join ( select "C_CUSTOMER_ID" AS "customer_id", SUM(((cast((cast((cast("CS_EXT_LIST_PRICE" as NUMBER(38, 17)) - cast("CS_EXT_WHOLESALE_COST" as NUMBER(38, 17))) as NUMBER(38, 16)) - cast("CS_EXT_DISCOUNT_AMT" as NUMBER(38, 16))) as NUMBER(38, 15)) + cast("CS_EXT_SALES_PRICE" as NUMBER(38, 15))) / 2.000000000000000)) AS "year_total"
from TPCDS.CUSTOMER  join TPCDS.CATALOG_SALES  on ("C_CUSTOMER_SK" = "CS_BILL_CUSTOMER_SK") join TPCDS.DATE_DIM  on ("CS_SOLD_DATE_SK" = "D_DATE_SK")
where (("CS_BILL_CUSTOMER_SK" IS NOT NULL AND "CS_SOLD_DATE_SK" IS NOT NULL) AND ("D_YEAR" IS NOT NULL AND ("D_YEAR" = 2002.000000000000000000)))
group by "C_CUSTOMER_ID", "C_FIRST_NAME", "C_LAST_NAME", "C_PREFERRED_CUST_FLAG", "C_BIRTH_COUNTRY", "C_LOGIN", "C_EMAIL_ADDRESS", "D_YEAR" ) "sparkora_3" on (("sparkora_0"."customer_id" = "sparkora_3"."customer_id") AND (CASE WHEN ("sparkora_2"."year_total" > 0E-15) THEN ("sparkora_3"."year_total" / "sparkora_2"."year_total") ELSE null END > CASE WHEN ("sparkora_0"."year_total" > 0E-15) THEN ("sparkora_1"."year_total" / "sparkora_0"."year_total") ELSE null END)) join ( select "customer_id" AS "customer_id", "year_total" AS "year_total"
from ( select "C_CUSTOMER_ID" AS "customer_id", SUM(((cast((cast((cast("WS_EXT_LIST_PRICE" as NUMBER(38, 17)) - cast("WS_EXT_WHOLESALE_COST" as NUMBER(38, 17))) as NUMBER(38, 16)) - cast("WS_EXT_DISCOUNT_AMT" as NUMBER(38, 16))) as NUMBER(38, 15)) + cast("WS_EXT_SALES_PRICE" as NUMBER(38, 15))) / 2.000000000000000)) AS "year_total"
from TPCDS.CUSTOMER  join TPCDS.WEB_SALES  on ("C_CUSTOMER_SK" = "WS_BILL_CUSTOMER_SK") join TPCDS.DATE_DIM  on ("WS_SOLD_DATE_SK" = "D_DATE_SK")
where (("WS_BILL_CUSTOMER_SK" IS NOT NULL AND "WS_SOLD_DATE_SK" IS NOT NULL) AND ("D_YEAR" IS NOT NULL AND ("D_YEAR" = 2001.000000000000000000)))
group by "C_CUSTOMER_ID", "C_FIRST_NAME", "C_LAST_NAME", "C_PREFERRED_CUST_FLAG", "C_BIRTH_COUNTRY", "C_LOGIN", "C_EMAIL_ADDRESS", "D_YEAR" ) 
where ("year_total" IS NOT NULL AND ("year_total" > 0E-15)) ) "sparkora_4" on ("sparkora_0"."customer_id" = "sparkora_4"."customer_id") join ( select "C_CUSTOMER_ID" AS "customer_id", SUM(((cast((cast((cast("WS_EXT_LIST_PRICE" as NUMBER(38, 17)) - cast("WS_EXT_WHOLESALE_COST" as NUMBER(38, 17))) as NUMBER(38, 16)) - cast("WS_EXT_DISCOUNT_AMT" as NUMBER(38, 16))) as NUMBER(38, 15)) + cast("WS_EXT_SALES_PRICE" as NUMBER(38, 15))) / 2.000000000000000)) AS "year_total"
from TPCDS.CUSTOMER  join TPCDS.WEB_SALES  on ("C_CUSTOMER_SK" = "WS_BILL_CUSTOMER_SK") join TPCDS.DATE_DIM  on ("WS_SOLD_DATE_SK" = "D_DATE_SK")
where (("WS_BILL_CUSTOMER_SK" IS NOT NULL AND "WS_SOLD_DATE_SK" IS NOT NULL) AND ("D_YEAR" IS NOT NULL AND ("D_YEAR" = 2002.000000000000000000)))
group by "C_CUSTOMER_ID", "C_FIRST_NAME", "C_LAST_NAME", "C_PREFERRED_CUST_FLAG", "C_BIRTH_COUNTRY", "C_LOGIN", "C_EMAIL_ADDRESS", "D_YEAR" ) "sparkora_5" on (("sparkora_0"."customer_id" = "sparkora_5"."customer_id") AND (CASE WHEN ("sparkora_2"."year_total" > 0E-15) THEN ("sparkora_3"."year_total" / "sparkora_2"."year_total") ELSE null END > CASE WHEN ("sparkora_4"."year_total" > 0E-15) THEN ("sparkora_5"."year_total" / "sparkora_4"."year_total") ELSE null END))
where ("sparkora_0"."year_total" IS NOT NULL AND ("sparkora_0"."year_total" > 0E-15))
order by "sparkora_1"."customer_id" ASC NULLS FIRST, "customer_first_name" ASC NULLS FIRST, "customer_last_name" ASC NULLS FIRST, "customer_preferred_cust_flag" ASC NULLS FIRST ) 
where rownum <= 100
Pushdown Oracle SQL, oracle plan stats estimates:
rowCount = 3, bytes=225
Pushdown Oracle SQL, Query Splitting details:
Query is not split

Spark Plan with Pushdown turned off

== Physical Plan ==
TakeOrderedAndProject (153)
+- * Project (152)
   +- * SortMergeJoin Inner (151)
      :- * Project (127)
      :  +- * SortMergeJoin Inner (126)
      :     :- * Project (100)
      :     :  +- * SortMergeJoin Inner (99)
      :     :     :- * Project (75)
      :     :     :  +- * SortMergeJoin Inner (74)
      :     :     :     :- * SortMergeJoin Inner (48)
      :     :     :     :  :- * Sort (24)
      :     :     :     :  :  +- Exchange (23)
      :     :     :     :  :     +- * Filter (22)
      :     :     :     :  :        +- * HashAggregate (21)
      :     :     :     :  :           +- Exchange (20)
      :     :     :     :  :              +- * HashAggregate (19)
      :     :     :     :  :                 +- * Project (18)
      :     :     :     :  :                    +- * SortMergeJoin Inner (17)
      :     :     :     :  :                       :- * Sort (12)
      :     :     :     :  :                       :  +- Exchange (11)
      :     :     :     :  :                       :     +- * Project (10)
      :     :     :     :  :                       :        +- * SortMergeJoin Inner (9)
      :     :     :     :  :                       :           :- * Sort (4)
      :     :     :     :  :                       :           :  +- Exchange (3)
      :     :     :     :  :                       :           :     +- * Project (2)
      :     :     :     :  :                       :           :        +- BatchScan (1)
      :     :     :     :  :                       :           +- * Sort (8)
      :     :     :     :  :                       :              +- Exchange (7)
      :     :     :     :  :                       :                 +- * Filter (6)
      :     :     :     :  :                       :                    +- BatchScan (5)
      :     :     :     :  :                       +- * Sort (16)
      :     :     :     :  :                          +- Exchange (15)
      :     :     :     :  :                             +- * Filter (14)
      :     :     :     :  :                                +- BatchScan (13)
      :     :     :     :  +- * Sort (47)
      :     :     :     :     +- Exchange (46)
      :     :     :     :        +- * HashAggregate (45)
      :     :     :     :           +- Exchange (44)
      :     :     :     :              +- * HashAggregate (43)
      :     :     :     :                 +- * Project (42)
      :     :     :     :                    +- * SortMergeJoin Inner (41)
      :     :     :     :                       :- * Sort (36)
      :     :     :     :                       :  +- Exchange (35)
      :     :     :     :                       :     +- * Project (34)
      :     :     :     :                       :        +- * SortMergeJoin Inner (33)
      :     :     :     :                       :           :- * Sort (28)
      :     :     :     :                       :           :  +- Exchange (27)
      :     :     :     :                       :           :     +- * Project (26)
      :     :     :     :                       :           :        +- BatchScan (25)
      :     :     :     :                       :           +- * Sort (32)
      :     :     :     :                       :              +- Exchange (31)
      :     :     :     :                       :                 +- * Filter (30)
      :     :     :     :                       :                    +- BatchScan (29)
      :     :     :     :                       +- * Sort (40)
      :     :     :     :                          +- Exchange (39)
      :     :     :     :                             +- * Filter (38)
      :     :     :     :                                +- BatchScan (37)
      :     :     :     +- * Sort (73)
      :     :     :        +- Exchange (72)
      :     :     :           +- * Project (71)
      :     :     :              +- * Filter (70)
      :     :     :                 +- * HashAggregate (69)
      :     :     :                    +- Exchange (68)
      :     :     :                       +- * HashAggregate (67)
      :     :     :                          +- * Project (66)
      :     :     :                             +- * SortMergeJoin Inner (65)
      :     :     :                                :- * Sort (60)
      :     :     :                                :  +- Exchange (59)
      :     :     :                                :     +- * Project (58)
      :     :     :                                :        +- * SortMergeJoin Inner (57)
      :     :     :                                :           :- * Sort (52)
      :     :     :                                :           :  +- Exchange (51)
      :     :     :                                :           :     +- * Project (50)
      :     :     :                                :           :        +- BatchScan (49)
      :     :     :                                :           +- * Sort (56)
      :     :     :                                :              +- Exchange (55)
      :     :     :                                :                 +- * Filter (54)
      :     :     :                                :                    +- BatchScan (53)
      :     :     :                                +- * Sort (64)
      :     :     :                                   +- Exchange (63)
      :     :     :                                      +- * Filter (62)
      :     :     :                                         +- BatchScan (61)
      :     :     +- * Sort (98)
      :     :        +- Exchange (97)
      :     :           +- * HashAggregate (96)
      :     :              +- Exchange (95)
      :     :                 +- * HashAggregate (94)
      :     :                    +- * Project (93)
      :     :                       +- * SortMergeJoin Inner (92)
      :     :                          :- * Sort (87)
      :     :                          :  +- Exchange (86)
      :     :                          :     +- * Project (85)
      :     :                          :        +- * SortMergeJoin Inner (84)
      :     :                          :           :- * Sort (79)
      :     :                          :           :  +- Exchange (78)
      :     :                          :           :     +- * Project (77)
      :     :                          :           :        +- BatchScan (76)
      :     :                          :           +- * Sort (83)
      :     :                          :              +- Exchange (82)
      :     :                          :                 +- * Filter (81)
      :     :                          :                    +- BatchScan (80)
      :     :                          +- * Sort (91)
      :     :                             +- Exchange (90)
      :     :                                +- * Filter (89)
      :     :                                   +- BatchScan (88)
      :     +- * Sort (125)
      :        +- Exchange (124)
      :           +- * Project (123)
      :              +- * Filter (122)
      :                 +- * HashAggregate (121)
      :                    +- Exchange (120)
      :                       +- * HashAggregate (119)
      :                          +- * Project (118)
      :                             +- * SortMergeJoin Inner (117)
      :                                :- * Sort (112)
      :                                :  +- Exchange (111)
      :                                :     +- * Project (110)
      :                                :        +- * SortMergeJoin Inner (109)
      :                                :           :- * Sort (104)
      :                                :           :  +- Exchange (103)
      :                                :           :     +- * Project (102)
      :                                :           :        +- BatchScan (101)
      :                                :           +- * Sort (108)
      :                                :              +- Exchange (107)
      :                                :                 +- * Filter (106)
      :                                :                    +- BatchScan (105)
      :                                +- * Sort (116)
      :                                   +- Exchange (115)
      :                                      +- * Filter (114)
      :                                         +- BatchScan (113)
      +- * Sort (150)
         +- Exchange (149)
            +- * HashAggregate (148)
               +- Exchange (147)
                  +- * HashAggregate (146)
                     +- * Project (145)
                        +- * SortMergeJoin Inner (144)
                           :- * Sort (139)
                           :  +- Exchange (138)
                           :     +- * Project (137)
                           :        +- * SortMergeJoin Inner (136)
                           :           :- * Sort (131)
                           :           :  +- Exchange (130)
                           :           :     +- * Project (129)
                           :           :        +- BatchScan (128)
                           :           +- * Sort (135)
                           :              +- Exchange (134)
                           :                 +- * Filter (133)
                           :                    +- BatchScan (132)
                           +- * Sort (143)
                              +- Exchange (142)
                                 +- * Filter (141)
                                    +- BatchScan (140)


(1) BatchScan
Output [8]: [C_CUSTOMER_SK#1413, C_CUSTOMER_ID#1414, C_FIRST_NAME#1421, C_LAST_NAME#1422, C_PREFERRED_CUST_FLAG#1423, C_BIRTH_COUNTRY#1427, C_LOGIN#1428, C_EMAIL_ADDRESS#1429]
Format: orafile
OraPlan: 00 OraTableScan TPCDS.CUSTOMER, [C_CUSTOMER_SK#2859, C_CUSTOMER_ID#2860, C_FIRST_NAME#2861, C_LAST_NAME#2862, C_PREFERRED_CUST_FLAG#2863, C_BIRTH_COUNTRY#2864, C_LOGIN#2865, C_EMAIL_ADDRESS#2866], [oracolumnref(C_CUSTOMER_SK#2859), oracolumnref(C_CUSTOMER_ID#2860), oracolumnref(C_FIRST_NAME#2861), oracolumnref(C_LAST_NAME#2862), oracolumnref(C_PREFERRED_CUST_FLAG#2863), oracolumnref(C_BIRTH_COUNTRY#2864), oracolumnref(C_LOGIN#2865), oracolumnref(C_EMAIL_ADDRESS#2866)]
PartitionSchema: struct<>
ReadSchema: struct<C_CUSTOMER_SK:decimal(38,18),C_CUSTOMER_ID:string,C_FIRST_NAME:string,C_LAST_NAME:string,C_PREFERRED_CUST_FLAG:string,C_BIRTH_COUNTRY:string,C_LOGIN:string,C_EMAIL_ADDRESS:string>
dsKey: DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
oraPushdownSQL: select "C_CUSTOMER_SK", "C_CUSTOMER_ID", "C_FIRST_NAME", "C_LAST_NAME", "C_PREFERRED_CUST_FLAG", "C_BIRTH_COUNTRY", "C_LOGIN", "C_EMAIL_ADDRESS"
from TPCDS.CUSTOMER

(2) Project [codegen id : 1]
Output [8]: [C_CUSTOMER_SK#1413, C_CUSTOMER_ID#1414, C_FIRST_NAME#1421, C_LAST_NAME#1422, C_PREFERRED_CUST_FLAG#1423, C_BIRTH_COUNTRY#1427, C_LOGIN#1428, C_EMAIL_ADDRESS#1429]
Input [8]: [C_CUSTOMER_SK#1413, C_CUSTOMER_ID#1414, C_FIRST_NAME#1421, C_LAST_NAME#1422, C_PREFERRED_CUST_FLAG#1423, C_BIRTH_COUNTRY#1427, C_LOGIN#1428, C_EMAIL_ADDRESS#1429]

(3) Exchange
Input [8]: [C_CUSTOMER_SK#1413, C_CUSTOMER_ID#1414, C_FIRST_NAME#1421, C_LAST_NAME#1422, C_PREFERRED_CUST_FLAG#1423, C_BIRTH_COUNTRY#1427, C_LOGIN#1428, C_EMAIL_ADDRESS#1429]
Arguments: hashpartitioning(c_customer_sk#1413, 5), ENSURE_REQUIREMENTS, [id=#1385]

(4) Sort [codegen id : 2]
Input [8]: [C_CUSTOMER_SK#1413, C_CUSTOMER_ID#1414, C_FIRST_NAME#1421, C_LAST_NAME#1422, C_PREFERRED_CUST_FLAG#1423, C_BIRTH_COUNTRY#1427, C_LOGIN#1428, C_EMAIL_ADDRESS#1429]
Arguments: [c_customer_sk#1413 ASC NULLS FIRST], false, 0

(5) BatchScan
Output [6]: [SS_CUSTOMER_SK#1434, SS_EXT_DISCOUNT_AMT#1445, SS_EXT_SALES_PRICE#1446, SS_EXT_WHOLESALE_COST#1447, SS_EXT_LIST_PRICE#1448, SS_SOLD_DATE_SK#1431]
Format: orafile
OraPlan: 00 OraTableScan TPCDS.STORE_SALES, [SS_CUSTOMER_SK#2875, SS_EXT_DISCOUNT_AMT#2876, SS_EXT_SALES_PRICE#2877, SS_EXT_WHOLESALE_COST#2878, SS_EXT_LIST_PRICE#2879, SS_SOLD_DATE_SK#2880], [oracolumnref(SS_CUSTOMER_SK#2875), oracolumnref(SS_EXT_DISCOUNT_AMT#2876), oracolumnref(SS_EXT_SALES_PRICE#2877), oracolumnref(SS_EXT_WHOLESALE_COST#2878), oracolumnref(SS_EXT_LIST_PRICE#2879), oracolumnref(SS_SOLD_DATE_SK#2880)], orapostfixunaryopexpression(isnotnull(SS_CUSTOMER_SK#1434))
PartitionSchema: struct<SS_SOLD_DATE_SK:decimal(38,18)>
ReadSchema: struct<SS_CUSTOMER_SK:decimal(38,18),SS_EXT_DISCOUNT_AMT:decimal(38,18),SS_EXT_SALES_PRICE:decimal(38,18),SS_EXT_WHOLESALE_COST:decimal(38,18),SS_EXT_LIST_PRICE:decimal(38,18)>
dsKey: DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
oraPushdownSQL: select "SS_CUSTOMER_SK", "SS_EXT_DISCOUNT_AMT", "SS_EXT_SALES_PRICE", "SS_EXT_WHOLESALE_COST", "SS_EXT_LIST_PRICE", "SS_SOLD_DATE_SK"
from TPCDS.STORE_SALES
where "SS_CUSTOMER_SK" IS NOT NULL and "SS_SOLD_DATE_SK" IS NOT NULL

(6) Filter [codegen id : 3]
Input [6]: [SS_CUSTOMER_SK#1434, SS_EXT_DISCOUNT_AMT#1445, SS_EXT_SALES_PRICE#1446, SS_EXT_WHOLESALE_COST#1447, SS_EXT_LIST_PRICE#1448, SS_SOLD_DATE_SK#1431]
Condition : isnotnull(SS_CUSTOMER_SK#1434)

(7) Exchange
Input [6]: [SS_CUSTOMER_SK#1434, SS_EXT_DISCOUNT_AMT#1445, SS_EXT_SALES_PRICE#1446, SS_EXT_WHOLESALE_COST#1447, SS_EXT_LIST_PRICE#1448, SS_SOLD_DATE_SK#1431]
Arguments: hashpartitioning(ss_customer_sk#1434, 5), ENSURE_REQUIREMENTS, [id=#1393]

(8) Sort [codegen id : 4]
Input [6]: [SS_CUSTOMER_SK#1434, SS_EXT_DISCOUNT_AMT#1445, SS_EXT_SALES_PRICE#1446, SS_EXT_WHOLESALE_COST#1447, SS_EXT_LIST_PRICE#1448, SS_SOLD_DATE_SK#1431]
Arguments: [ss_customer_sk#1434 ASC NULLS FIRST], false, 0

(9) SortMergeJoin [codegen id : 5]
Left keys [1]: [c_customer_sk#1413]
Right keys [1]: [ss_customer_sk#1434]
Join condition: None

(10) Project [codegen id : 5]
Output [12]: [C_CUSTOMER_ID#1414, C_FIRST_NAME#1421, C_LAST_NAME#1422, C_PREFERRED_CUST_FLAG#1423, C_BIRTH_COUNTRY#1427, C_LOGIN#1428, C_EMAIL_ADDRESS#1429, SS_SOLD_DATE_SK#1431, SS_EXT_DISCOUNT_AMT#1445, SS_EXT_SALES_PRICE#1446, SS_EXT_WHOLESALE_COST#1447, SS_EXT_LIST_PRICE#1448]
Input [14]: [C_CUSTOMER_SK#1413, C_CUSTOMER_ID#1414, C_FIRST_NAME#1421, C_LAST_NAME#1422, C_PREFERRED_CUST_FLAG#1423, C_BIRTH_COUNTRY#1427, C_LOGIN#1428, C_EMAIL_ADDRESS#1429, SS_CUSTOMER_SK#1434, SS_EXT_DISCOUNT_AMT#1445, SS_EXT_SALES_PRICE#1446, SS_EXT_WHOLESALE_COST#1447, SS_EXT_LIST_PRICE#1448, SS_SOLD_DATE_SK#1431]

(11) Exchange
Input [12]: [C_CUSTOMER_ID#1414, C_FIRST_NAME#1421, C_LAST_NAME#1422, C_PREFERRED_CUST_FLAG#1423, C_BIRTH_COUNTRY#1427, C_LOGIN#1428, C_EMAIL_ADDRESS#1429, SS_SOLD_DATE_SK#1431, SS_EXT_DISCOUNT_AMT#1445, SS_EXT_SALES_PRICE#1446, SS_EXT_WHOLESALE_COST#1447, SS_EXT_LIST_PRICE#1448]
Arguments: hashpartitioning(ss_sold_date_sk#1431, 5), ENSURE_REQUIREMENTS, [id=#1401]

(12) Sort [codegen id : 6]
Input [12]: [C_CUSTOMER_ID#1414, C_FIRST_NAME#1421, C_LAST_NAME#1422, C_PREFERRED_CUST_FLAG#1423, C_BIRTH_COUNTRY#1427, C_LOGIN#1428, C_EMAIL_ADDRESS#1429, SS_SOLD_DATE_SK#1431, SS_EXT_DISCOUNT_AMT#1445, SS_EXT_SALES_PRICE#1446, SS_EXT_WHOLESALE_COST#1447, SS_EXT_LIST_PRICE#1448]
Arguments: [ss_sold_date_sk#1431 ASC NULLS FIRST], false, 0

(13) BatchScan
Output [2]: [D_DATE_SK#1454, D_YEAR#1460]
Format: orafile
OraPlan: 00 OraTableScan TPCDS.DATE_DIM, [D_DATE_SK#2887, D_YEAR#2888], [oracolumnref(D_DATE_SK#2887), oracolumnref(D_YEAR#2888)], orabinaryopexpression((isnotnull(D_YEAR#1460) AND (D_YEAR#1460 = 2001.000000000000000000)))
PartitionSchema: struct<>
ReadSchema: struct<D_DATE_SK:decimal(38,18),D_YEAR:decimal(38,18)>
dsKey: DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
oraPushdownBindValues: 2001.000000000000000000
oraPushdownSQL: select "D_DATE_SK", "D_YEAR"
from TPCDS.DATE_DIM
where ("D_YEAR" IS NOT NULL AND ("D_YEAR" = ?))

(14) Filter [codegen id : 7]
Input [2]: [D_DATE_SK#1454, D_YEAR#1460]
Condition : (isnotnull(D_YEAR#1460) AND (D_YEAR#1460 = 2001.000000000000000000))

(15) Exchange
Input [2]: [D_DATE_SK#1454, D_YEAR#1460]
Arguments: hashpartitioning(d_date_sk#1454, 5), ENSURE_REQUIREMENTS, [id=#1409]

(16) Sort [codegen id : 8]
Input [2]: [D_DATE_SK#1454, D_YEAR#1460]
Arguments: [d_date_sk#1454 ASC NULLS FIRST], false, 0

(17) SortMergeJoin [codegen id : 9]
Left keys [1]: [ss_sold_date_sk#1431]
Right keys [1]: [d_date_sk#1454]
Join condition: None

(18) Project [codegen id : 9]
Output [12]: [C_CUSTOMER_ID#1414, C_FIRST_NAME#1421, C_LAST_NAME#1422, C_PREFERRED_CUST_FLAG#1423, C_BIRTH_COUNTRY#1427, C_LOGIN#1428, C_EMAIL_ADDRESS#1429, SS_EXT_DISCOUNT_AMT#1445, SS_EXT_SALES_PRICE#1446, SS_EXT_WHOLESALE_COST#1447, SS_EXT_LIST_PRICE#1448, D_YEAR#1460]
Input [14]: [C_CUSTOMER_ID#1414, C_FIRST_NAME#1421, C_LAST_NAME#1422, C_PREFERRED_CUST_FLAG#1423, C_BIRTH_COUNTRY#1427, C_LOGIN#1428, C_EMAIL_ADDRESS#1429, SS_SOLD_DATE_SK#1431, SS_EXT_DISCOUNT_AMT#1445, SS_EXT_SALES_PRICE#1446, SS_EXT_WHOLESALE_COST#1447, SS_EXT_LIST_PRICE#1448, D_DATE_SK#1454, D_YEAR#1460]

(19) HashAggregate [codegen id : 9]
Input [12]: [C_CUSTOMER_ID#1414, C_FIRST_NAME#1421, C_LAST_NAME#1422, C_PREFERRED_CUST_FLAG#1423, C_BIRTH_COUNTRY#1427, C_LOGIN#1428, C_EMAIL_ADDRESS#1429, SS_EXT_DISCOUNT_AMT#1445, SS_EXT_SALES_PRICE#1446, SS_EXT_WHOLESALE_COST#1447, SS_EXT_LIST_PRICE#1448, D_YEAR#1460]
Keys [8]: [c_customer_id#1414, c_first_name#1421, c_last_name#1422, c_preferred_cust_flag#1423, c_birth_country#1427, c_login#1428, c_email_address#1429, d_year#1460]
Functions [1]: [partial_sum(CheckOverflow((promote_precision(CheckOverflow((promote_precision(cast(CheckOverflow((promote_precision(cast(CheckOverflow((promote_precision(cast(ss_ext_list_price#1448 as decimal(38,17))) - promote_precision(cast(ss_ext_wholesale_cost#1447 as decimal(38,17)))), DecimalType(38,17), true) as decimal(38,16))) - promote_precision(cast(ss_ext_discount_amt#1445 as decimal(38,16)))), DecimalType(38,16), true) as decimal(38,15))) + promote_precision(cast(ss_ext_sales_price#1446 as decimal(38,15)))), DecimalType(38,15), true)) / 2.000000000000000), DecimalType(38,15), true))]
Aggregate Attributes [2]: [sum#3243, isEmpty#3244]
Results [10]: [c_customer_id#1414, c_first_name#1421, c_last_name#1422, c_preferred_cust_flag#1423, c_birth_country#1427, c_login#1428, c_email_address#1429, d_year#1460, sum#3245, isEmpty#3246]

(20) Exchange
Input [10]: [c_customer_id#1414, c_first_name#1421, c_last_name#1422, c_preferred_cust_flag#1423, c_birth_country#1427, c_login#1428, c_email_address#1429, d_year#1460, sum#3245, isEmpty#3246]
Arguments: hashpartitioning(c_customer_id#1414, c_first_name#1421, c_last_name#1422, c_preferred_cust_flag#1423, c_birth_country#1427, c_login#1428, c_email_address#1429, d_year#1460, 5), ENSURE_REQUIREMENTS, [id=#1418]

(21) HashAggregate [codegen id : 10]
Input [10]: [c_customer_id#1414, c_first_name#1421, c_last_name#1422, c_preferred_cust_flag#1423, c_birth_country#1427, c_login#1428, c_email_address#1429, d_year#1460, sum#3245, isEmpty#3246]
Keys [8]: [c_customer_id#1414, c_first_name#1421, c_last_name#1422, c_preferred_cust_flag#1423, c_birth_country#1427, c_login#1428, c_email_address#1429, d_year#1460]
Functions [1]: [sum(CheckOverflow((promote_precision(CheckOverflow((promote_precision(cast(CheckOverflow((promote_precision(cast(CheckOverflow((promote_precision(cast(ss_ext_list_price#1448 as decimal(38,17))) - promote_precision(cast(ss_ext_wholesale_cost#1447 as decimal(38,17)))), DecimalType(38,17), true) as decimal(38,16))) - promote_precision(cast(ss_ext_discount_amt#1445 as decimal(38,16)))), DecimalType(38,16), true) as decimal(38,15))) + promote_precision(cast(ss_ext_sales_price#1446 as decimal(38,15)))), DecimalType(38,15), true)) / 2.000000000000000), DecimalType(38,15), true))]
Aggregate Attributes [1]: [sum(CheckOverflow((promote_precision(CheckOverflow((promote_precision(cast(CheckOverflow((promote_precision(cast(CheckOverflow((promote_precision(cast(ss_ext_list_price#1448 as decimal(38,17))) - promote_precision(cast(ss_ext_wholesale_cost#1447 as decimal(38,17)))), DecimalType(38,17), true) as decimal(38,16))) - promote_precision(cast(ss_ext_discount_amt#1445 as decimal(38,16)))), DecimalType(38,16), true) as decimal(38,15))) + promote_precision(cast(ss_ext_sales_price#1446 as decimal(38,15)))), DecimalType(38,15), true)) / 2.000000000000000), DecimalType(38,15), true))#2787]
Results [2]: [c_customer_id#1414 AS customer_id#1383, sum(CheckOverflow((promote_precision(CheckOverflow((promote_precision(cast(CheckOverflow((promote_precision(cast(CheckOverflow((promote_precision(cast(ss_ext_list_price#1448 as decimal(38,17))) - promote_precision(cast(ss_ext_wholesale_cost#1447 as decimal(38,17)))), DecimalType(38,17), true) as decimal(38,16))) - promote_precision(cast(ss_ext_discount_amt#1445 as decimal(38,16)))), DecimalType(38,16), true) as decimal(38,15))) + promote_precision(cast(ss_ext_sales_price#1446 as decimal(38,15)))), DecimalType(38,15), true)) / 2.000000000000000), DecimalType(38,15), true))#2787 AS year_total#1391]

(22) Filter [codegen id : 10]
Input [2]: [customer_id#1383, year_total#1391]
Condition : (isnotnull(year_total#1391) AND (year_total#1391 > 0E-15))

(23) Exchange
Input [2]: [customer_id#1383, year_total#1391]
Arguments: hashpartitioning(customer_id#1383, 5), ENSURE_REQUIREMENTS, [id=#1423]

(24) Sort [codegen id : 11]
Input [2]: [customer_id#1383, year_total#1391]
Arguments: [customer_id#1383 ASC NULLS FIRST], false, 0

(25) BatchScan
Output [8]: [C_CUSTOMER_SK#1642, C_CUSTOMER_ID#1643, C_FIRST_NAME#1650, C_LAST_NAME#1651, C_PREFERRED_CUST_FLAG#1652, C_BIRTH_COUNTRY#1656, C_LOGIN#1657, C_EMAIL_ADDRESS#1658]
Format: orafile
OraPlan: 00 OraTableScan TPCDS.CUSTOMER, [C_CUSTOMER_SK#2923, C_CUSTOMER_ID#2924, C_FIRST_NAME#2925, C_LAST_NAME#2926, C_PREFERRED_CUST_FLAG#2927, C_BIRTH_COUNTRY#2928, C_LOGIN#2929, C_EMAIL_ADDRESS#2930], [oracolumnref(C_CUSTOMER_SK#2923), oracolumnref(C_CUSTOMER_ID#2924), oracolumnref(C_FIRST_NAME#2925), oracolumnref(C_LAST_NAME#2926), oracolumnref(C_PREFERRED_CUST_FLAG#2927), oracolumnref(C_BIRTH_COUNTRY#2928), oracolumnref(C_LOGIN#2929), oracolumnref(C_EMAIL_ADDRESS#2930)]
PartitionSchema: struct<>
ReadSchema: struct<C_CUSTOMER_SK:decimal(38,18),C_CUSTOMER_ID:string,C_FIRST_NAME:string,C_LAST_NAME:string,C_PREFERRED_CUST_FLAG:string,C_BIRTH_COUNTRY:string,C_LOGIN:string,C_EMAIL_ADDRESS:string>
dsKey: DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
oraPushdownSQL: select "C_CUSTOMER_SK", "C_CUSTOMER_ID", "C_FIRST_NAME", "C_LAST_NAME", "C_PREFERRED_CUST_FLAG", "C_BIRTH_COUNTRY", "C_LOGIN", "C_EMAIL_ADDRESS"
from TPCDS.CUSTOMER

(26) Project [codegen id : 12]
Output [8]: [C_CUSTOMER_SK#1642, C_CUSTOMER_ID#1643, C_FIRST_NAME#1650, C_LAST_NAME#1651, C_PREFERRED_CUST_FLAG#1652, C_BIRTH_COUNTRY#1656, C_LOGIN#1657, C_EMAIL_ADDRESS#1658]
Input [8]: [C_CUSTOMER_SK#1642, C_CUSTOMER_ID#1643, C_FIRST_NAME#1650, C_LAST_NAME#1651, C_PREFERRED_CUST_FLAG#1652, C_BIRTH_COUNTRY#1656, C_LOGIN#1657, C_EMAIL_ADDRESS#1658]

(27) Exchange
Input [8]: [C_CUSTOMER_SK#1642, C_CUSTOMER_ID#1643, C_FIRST_NAME#1650, C_LAST_NAME#1651, C_PREFERRED_CUST_FLAG#1652, C_BIRTH_COUNTRY#1656, C_LOGIN#1657, C_EMAIL_ADDRESS#1658]
Arguments: hashpartitioning(c_customer_sk#1642, 5), ENSURE_REQUIREMENTS, [id=#1431]

(28) Sort [codegen id : 13]
Input [8]: [C_CUSTOMER_SK#1642, C_CUSTOMER_ID#1643, C_FIRST_NAME#1650, C_LAST_NAME#1651, C_PREFERRED_CUST_FLAG#1652, C_BIRTH_COUNTRY#1656, C_LOGIN#1657, C_EMAIL_ADDRESS#1658]
Arguments: [c_customer_sk#1642 ASC NULLS FIRST], false, 0

(29) BatchScan
Output [6]: [SS_CUSTOMER_SK#1663, SS_EXT_DISCOUNT_AMT#1674, SS_EXT_SALES_PRICE#1675, SS_EXT_WHOLESALE_COST#1676, SS_EXT_LIST_PRICE#1677, SS_SOLD_DATE_SK#1660]
Format: orafile
OraPlan: 00 OraTableScan TPCDS.STORE_SALES, [SS_CUSTOMER_SK#2939, SS_EXT_DISCOUNT_AMT#2940, SS_EXT_SALES_PRICE#2941, SS_EXT_WHOLESALE_COST#2942, SS_EXT_LIST_PRICE#2943, SS_SOLD_DATE_SK#2944], [oracolumnref(SS_CUSTOMER_SK#2939), oracolumnref(SS_EXT_DISCOUNT_AMT#2940), oracolumnref(SS_EXT_SALES_PRICE#2941), oracolumnref(SS_EXT_WHOLESALE_COST#2942), oracolumnref(SS_EXT_LIST_PRICE#2943), oracolumnref(SS_SOLD_DATE_SK#2944)], orapostfixunaryopexpression(isnotnull(SS_CUSTOMER_SK#1663))
PartitionSchema: struct<SS_SOLD_DATE_SK:decimal(38,18)>
ReadSchema: struct<SS_CUSTOMER_SK:decimal(38,18),SS_EXT_DISCOUNT_AMT:decimal(38,18),SS_EXT_SALES_PRICE:decimal(38,18),SS_EXT_WHOLESALE_COST:decimal(38,18),SS_EXT_LIST_PRICE:decimal(38,18)>
dsKey: DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
oraPushdownSQL: select "SS_CUSTOMER_SK", "SS_EXT_DISCOUNT_AMT", "SS_EXT_SALES_PRICE", "SS_EXT_WHOLESALE_COST", "SS_EXT_LIST_PRICE", "SS_SOLD_DATE_SK"
from TPCDS.STORE_SALES
where "SS_CUSTOMER_SK" IS NOT NULL and "SS_SOLD_DATE_SK" IS NOT NULL

(30) Filter [codegen id : 14]
Input [6]: [SS_CUSTOMER_SK#1663, SS_EXT_DISCOUNT_AMT#1674, SS_EXT_SALES_PRICE#1675, SS_EXT_WHOLESALE_COST#1676, SS_EXT_LIST_PRICE#1677, SS_SOLD_DATE_SK#1660]
Condition : isnotnull(SS_CUSTOMER_SK#1663)

(31) Exchange
Input [6]: [SS_CUSTOMER_SK#1663, SS_EXT_DISCOUNT_AMT#1674, SS_EXT_SALES_PRICE#1675, SS_EXT_WHOLESALE_COST#1676, SS_EXT_LIST_PRICE#1677, SS_SOLD_DATE_SK#1660]
Arguments: hashpartitioning(ss_customer_sk#1663, 5), ENSURE_REQUIREMENTS, [id=#1439]

(32) Sort [codegen id : 15]
Input [6]: [SS_CUSTOMER_SK#1663, SS_EXT_DISCOUNT_AMT#1674, SS_EXT_SALES_PRICE#1675, SS_EXT_WHOLESALE_COST#1676, SS_EXT_LIST_PRICE#1677, SS_SOLD_DATE_SK#1660]
Arguments: [ss_customer_sk#1663 ASC NULLS FIRST], false, 0

(33) SortMergeJoin [codegen id : 16]
Left keys [1]: [c_customer_sk#1642]
Right keys [1]: [ss_customer_sk#1663]
Join condition: None

(34) Project [codegen id : 16]
Output [12]: [C_CUSTOMER_ID#1643, C_FIRST_NAME#1650, C_LAST_NAME#1651, C_PREFERRED_CUST_FLAG#1652, C_BIRTH_COUNTRY#1656, C_LOGIN#1657, C_EMAIL_ADDRESS#1658, SS_SOLD_DATE_SK#1660, SS_EXT_DISCOUNT_AMT#1674, SS_EXT_SALES_PRICE#1675, SS_EXT_WHOLESALE_COST#1676, SS_EXT_LIST_PRICE#1677]
Input [14]: [C_CUSTOMER_SK#1642, C_CUSTOMER_ID#1643, C_FIRST_NAME#1650, C_LAST_NAME#1651, C_PREFERRED_CUST_FLAG#1652, C_BIRTH_COUNTRY#1656, C_LOGIN#1657, C_EMAIL_ADDRESS#1658, SS_CUSTOMER_SK#1663, SS_EXT_DISCOUNT_AMT#1674, SS_EXT_SALES_PRICE#1675, SS_EXT_WHOLESALE_COST#1676, SS_EXT_LIST_PRICE#1677, SS_SOLD_DATE_SK#1660]

(35) Exchange
Input [12]: [C_CUSTOMER_ID#1643, C_FIRST_NAME#1650, C_LAST_NAME#1651, C_PREFERRED_CUST_FLAG#1652, C_BIRTH_COUNTRY#1656, C_LOGIN#1657, C_EMAIL_ADDRESS#1658, SS_SOLD_DATE_SK#1660, SS_EXT_DISCOUNT_AMT#1674, SS_EXT_SALES_PRICE#1675, SS_EXT_WHOLESALE_COST#1676, SS_EXT_LIST_PRICE#1677]
Arguments: hashpartitioning(ss_sold_date_sk#1660, 5), ENSURE_REQUIREMENTS, [id=#1447]

(36) Sort [codegen id : 17]
Input [12]: [C_CUSTOMER_ID#1643, C_FIRST_NAME#1650, C_LAST_NAME#1651, C_PREFERRED_CUST_FLAG#1652, C_BIRTH_COUNTRY#1656, C_LOGIN#1657, C_EMAIL_ADDRESS#1658, SS_SOLD_DATE_SK#1660, SS_EXT_DISCOUNT_AMT#1674, SS_EXT_SALES_PRICE#1675, SS_EXT_WHOLESALE_COST#1676, SS_EXT_LIST_PRICE#1677]
Arguments: [ss_sold_date_sk#1660 ASC NULLS FIRST], false, 0

(37) BatchScan
Output [2]: [D_DATE_SK#1683, D_YEAR#1689]
Format: orafile
OraPlan: 00 OraTableScan TPCDS.DATE_DIM, [D_DATE_SK#2951, D_YEAR#2952], [oracolumnref(D_DATE_SK#2951), oracolumnref(D_YEAR#2952)], orabinaryopexpression((isnotnull(D_YEAR#1689) AND (D_YEAR#1689 = 2002.000000000000000000)))
PartitionSchema: struct<>
ReadSchema: struct<D_DATE_SK:decimal(38,18),D_YEAR:decimal(38,18)>
dsKey: DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
oraPushdownBindValues: 2002.000000000000000000
oraPushdownSQL: select "D_DATE_SK", "D_YEAR"
from TPCDS.DATE_DIM
where ("D_YEAR" IS NOT NULL AND ("D_YEAR" = ?))

(38) Filter [codegen id : 18]
Input [2]: [D_DATE_SK#1683, D_YEAR#1689]
Condition : (isnotnull(D_YEAR#1689) AND (D_YEAR#1689 = 2002.000000000000000000))

(39) Exchange
Input [2]: [D_DATE_SK#1683, D_YEAR#1689]
Arguments: hashpartitioning(d_date_sk#1683, 5), ENSURE_REQUIREMENTS, [id=#1455]

(40) Sort [codegen id : 19]
Input [2]: [D_DATE_SK#1683, D_YEAR#1689]
Arguments: [d_date_sk#1683 ASC NULLS FIRST], false, 0

(41) SortMergeJoin [codegen id : 20]
Left keys [1]: [ss_sold_date_sk#1660]
Right keys [1]: [d_date_sk#1683]
Join condition: None

(42) Project [codegen id : 20]
Output [12]: [C_CUSTOMER_ID#1643, C_FIRST_NAME#1650, C_LAST_NAME#1651, C_PREFERRED_CUST_FLAG#1652, C_BIRTH_COUNTRY#1656, C_LOGIN#1657, C_EMAIL_ADDRESS#1658, SS_EXT_DISCOUNT_AMT#1674, SS_EXT_SALES_PRICE#1675, SS_EXT_WHOLESALE_COST#1676, SS_EXT_LIST_PRICE#1677, D_YEAR#1689]
Input [14]: [C_CUSTOMER_ID#1643, C_FIRST_NAME#1650, C_LAST_NAME#1651, C_PREFERRED_CUST_FLAG#1652, C_BIRTH_COUNTRY#1656, C_LOGIN#1657, C_EMAIL_ADDRESS#1658, SS_SOLD_DATE_SK#1660, SS_EXT_DISCOUNT_AMT#1674, SS_EXT_SALES_PRICE#1675, SS_EXT_WHOLESALE_COST#1676, SS_EXT_LIST_PRICE#1677, D_DATE_SK#1683, D_YEAR#1689]

(43) HashAggregate [codegen id : 20]
Input [12]: [C_CUSTOMER_ID#1643, C_FIRST_NAME#1650, C_LAST_NAME#1651, C_PREFERRED_CUST_FLAG#1652, C_BIRTH_COUNTRY#1656, C_LOGIN#1657, C_EMAIL_ADDRESS#1658, SS_EXT_DISCOUNT_AMT#1674, SS_EXT_SALES_PRICE#1675, SS_EXT_WHOLESALE_COST#1676, SS_EXT_LIST_PRICE#1677, D_YEAR#1689]
Keys [8]: [c_customer_id#1643, c_first_name#1650, c_last_name#1651, c_preferred_cust_flag#1652, c_birth_country#1656, c_login#1657, c_email_address#1658, d_year#1689]
Functions [1]: [partial_sum(CheckOverflow((promote_precision(CheckOverflow((promote_precision(cast(CheckOverflow((promote_precision(cast(CheckOverflow((promote_precision(cast(ss_ext_list_price#1677 as decimal(38,17))) - promote_precision(cast(ss_ext_wholesale_cost#1676 as decimal(38,17)))), DecimalType(38,17), true) as decimal(38,16))) - promote_precision(cast(ss_ext_discount_amt#1674 as decimal(38,16)))), DecimalType(38,16), true) as decimal(38,15))) + promote_precision(cast(ss_ext_sales_price#1675 as decimal(38,15)))), DecimalType(38,15), true)) / 2.000000000000000), DecimalType(38,15), true))]
Aggregate Attributes [2]: [sum#3247, isEmpty#3248]
Results [10]: [c_customer_id#1643, c_first_name#1650, c_last_name#1651, c_preferred_cust_flag#1652, c_birth_country#1656, c_login#1657, c_email_address#1658, d_year#1689, sum#3249, isEmpty#3250]

(44) Exchange
Input [10]: [c_customer_id#1643, c_first_name#1650, c_last_name#1651, c_preferred_cust_flag#1652, c_birth_country#1656, c_login#1657, c_email_address#1658, d_year#1689, sum#3249, isEmpty#3250]
Arguments: hashpartitioning(c_customer_id#1643, c_first_name#1650, c_last_name#1651, c_preferred_cust_flag#1652, c_birth_country#1656, c_login#1657, c_email_address#1658, d_year#1689, 5), ENSURE_REQUIREMENTS, [id=#1464]

(45) HashAggregate [codegen id : 21]
Input [10]: [c_customer_id#1643, c_first_name#1650, c_last_name#1651, c_preferred_cust_flag#1652, c_birth_country#1656, c_login#1657, c_email_address#1658, d_year#1689, sum#3249, isEmpty#3250]
Keys [8]: [c_customer_id#1643, c_first_name#1650, c_last_name#1651, c_preferred_cust_flag#1652, c_birth_country#1656, c_login#1657, c_email_address#1658, d_year#1689]
Functions [1]: [sum(CheckOverflow((promote_precision(CheckOverflow((promote_precision(cast(CheckOverflow((promote_precision(cast(CheckOverflow((promote_precision(cast(ss_ext_list_price#1677 as decimal(38,17))) - promote_precision(cast(ss_ext_wholesale_cost#1676 as decimal(38,17)))), DecimalType(38,17), true) as decimal(38,16))) - promote_precision(cast(ss_ext_discount_amt#1674 as decimal(38,16)))), DecimalType(38,16), true) as decimal(38,15))) + promote_precision(cast(ss_ext_sales_price#1675 as decimal(38,15)))), DecimalType(38,15), true)) / 2.000000000000000), DecimalType(38,15), true))]
Aggregate Attributes [1]: [sum(CheckOverflow((promote_precision(CheckOverflow((promote_precision(cast(CheckOverflow((promote_precision(cast(CheckOverflow((promote_precision(cast(ss_ext_list_price#1677 as decimal(38,17))) - promote_precision(cast(ss_ext_wholesale_cost#1676 as decimal(38,17)))), DecimalType(38,17), true) as decimal(38,16))) - promote_precision(cast(ss_ext_discount_amt#1674 as decimal(38,16)))), DecimalType(38,16), true) as decimal(38,15))) + promote_precision(cast(ss_ext_sales_price#1675 as decimal(38,15)))), DecimalType(38,15), true)) / 2.000000000000000), DecimalType(38,15), true))#2790]
Results [5]: [c_customer_id#1643 AS customer_id#2805, c_first_name#1650 AS customer_first_name#2806, c_last_name#1651 AS customer_last_name#2807, c_preferred_cust_flag#1652 AS customer_preferred_cust_flag#2808, sum(CheckOverflow((promote_precision(CheckOverflow((promote_precision(cast(CheckOverflow((promote_precision(cast(CheckOverflow((promote_precision(cast(ss_ext_list_price#1677 as decimal(38,17))) - promote_precision(cast(ss_ext_wholesale_cost#1676 as decimal(38,17)))), DecimalType(38,17), true) as decimal(38,16))) - promote_precision(cast(ss_ext_discount_amt#1674 as decimal(38,16)))), DecimalType(38,16), true) as decimal(38,15))) + promote_precision(cast(ss_ext_sales_price#1675 as decimal(38,15)))), DecimalType(38,15), true)) / 2.000000000000000), DecimalType(38,15), true))#2790 AS year_total#2813]

(46) Exchange
Input [5]: [customer_id#2805, customer_first_name#2806, customer_last_name#2807, customer_preferred_cust_flag#2808, year_total#2813]
Arguments: hashpartitioning(customer_id#2805, 5), ENSURE_REQUIREMENTS, [id=#1468]

(47) Sort [codegen id : 22]
Input [5]: [customer_id#2805, customer_first_name#2806, customer_last_name#2807, customer_preferred_cust_flag#2808, year_total#2813]
Arguments: [customer_id#2805 ASC NULLS FIRST], false, 0

(48) SortMergeJoin [codegen id : 23]
Left keys [1]: [customer_id#1383]
Right keys [1]: [customer_id#2805]
Join condition: None

(49) BatchScan
Output [8]: [C_CUSTOMER_SK#1940, C_CUSTOMER_ID#1941, C_FIRST_NAME#1948, C_LAST_NAME#1949, C_PREFERRED_CUST_FLAG#1950, C_BIRTH_COUNTRY#1954, C_LOGIN#1955, C_EMAIL_ADDRESS#1956]
Format: orafile
OraPlan: 00 OraTableScan TPCDS.CUSTOMER, [C_CUSTOMER_SK#3003, C_CUSTOMER_ID#3004, C_FIRST_NAME#3005, C_LAST_NAME#3006, C_PREFERRED_CUST_FLAG#3007, C_BIRTH_COUNTRY#3008, C_LOGIN#3009, C_EMAIL_ADDRESS#3010], [oracolumnref(C_CUSTOMER_SK#3003), oracolumnref(C_CUSTOMER_ID#3004), oracolumnref(C_FIRST_NAME#3005), oracolumnref(C_LAST_NAME#3006), oracolumnref(C_PREFERRED_CUST_FLAG#3007), oracolumnref(C_BIRTH_COUNTRY#3008), oracolumnref(C_LOGIN#3009), oracolumnref(C_EMAIL_ADDRESS#3010)]
PartitionSchema: struct<>
ReadSchema: struct<C_CUSTOMER_SK:decimal(38,18),C_CUSTOMER_ID:string,C_FIRST_NAME:string,C_LAST_NAME:string,C_PREFERRED_CUST_FLAG:string,C_BIRTH_COUNTRY:string,C_LOGIN:string,C_EMAIL_ADDRESS:string>
dsKey: DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
oraPushdownSQL: select "C_CUSTOMER_SK", "C_CUSTOMER_ID", "C_FIRST_NAME", "C_LAST_NAME", "C_PREFERRED_CUST_FLAG", "C_BIRTH_COUNTRY", "C_LOGIN", "C_EMAIL_ADDRESS"
from TPCDS.CUSTOMER

(50) Project [codegen id : 24]
Output [8]: [C_CUSTOMER_SK#1940, C_CUSTOMER_ID#1941, C_FIRST_NAME#1948, C_LAST_NAME#1949, C_PREFERRED_CUST_FLAG#1950, C_BIRTH_COUNTRY#1954, C_LOGIN#1955, C_EMAIL_ADDRESS#1956]
Input [8]: [C_CUSTOMER_SK#1940, C_CUSTOMER_ID#1941, C_FIRST_NAME#1948, C_LAST_NAME#1949, C_PREFERRED_CUST_FLAG#1950, C_BIRTH_COUNTRY#1954, C_LOGIN#1955, C_EMAIL_ADDRESS#1956]

(51) Exchange
Input [8]: [C_CUSTOMER_SK#1940, C_CUSTOMER_ID#1941, C_FIRST_NAME#1948, C_LAST_NAME#1949, C_PREFERRED_CUST_FLAG#1950, C_BIRTH_COUNTRY#1954, C_LOGIN#1955, C_EMAIL_ADDRESS#1956]
Arguments: hashpartitioning(c_customer_sk#1940, 5), ENSURE_REQUIREMENTS, [id=#1479]

(52) Sort [codegen id : 25]
Input [8]: [C_CUSTOMER_SK#1940, C_CUSTOMER_ID#1941, C_FIRST_NAME#1948, C_LAST_NAME#1949, C_PREFERRED_CUST_FLAG#1950, C_BIRTH_COUNTRY#1954, C_LOGIN#1955, C_EMAIL_ADDRESS#1956]
Arguments: [c_customer_sk#1940 ASC NULLS FIRST], false, 0

(53) BatchScan
Output [6]: [CS_BILL_CUSTOMER_SK#1961, CS_EXT_DISCOUNT_AMT#1980, CS_EXT_SALES_PRICE#1981, CS_EXT_WHOLESALE_COST#1982, CS_EXT_LIST_PRICE#1983, CS_SOLD_DATE_SK#1958]
Format: orafile
OraPlan: 00 OraTableScan TPCDS.CATALOG_SALES, [CS_BILL_CUSTOMER_SK#3019, CS_EXT_DISCOUNT_AMT#3020, CS_EXT_SALES_PRICE#3021, CS_EXT_WHOLESALE_COST#3022, CS_EXT_LIST_PRICE#3023, CS_SOLD_DATE_SK#3024], [oracolumnref(CS_BILL_CUSTOMER_SK#3019), oracolumnref(CS_EXT_DISCOUNT_AMT#3020), oracolumnref(CS_EXT_SALES_PRICE#3021), oracolumnref(CS_EXT_WHOLESALE_COST#3022), oracolumnref(CS_EXT_LIST_PRICE#3023), oracolumnref(CS_SOLD_DATE_SK#3024)], orapostfixunaryopexpression(isnotnull(CS_BILL_CUSTOMER_SK#1961))
PartitionSchema: struct<CS_SOLD_DATE_SK:decimal(38,18)>
ReadSchema: struct<CS_BILL_CUSTOMER_SK:decimal(38,18),CS_EXT_DISCOUNT_AMT:decimal(38,18),CS_EXT_SALES_PRICE:decimal(38,18),CS_EXT_WHOLESALE_COST:decimal(38,18),CS_EXT_LIST_PRICE:decimal(38,18)>
dsKey: DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
oraPushdownSQL: select "CS_BILL_CUSTOMER_SK", "CS_EXT_DISCOUNT_AMT", "CS_EXT_SALES_PRICE", "CS_EXT_WHOLESALE_COST", "CS_EXT_LIST_PRICE", "CS_SOLD_DATE_SK"
from TPCDS.CATALOG_SALES
where "CS_BILL_CUSTOMER_SK" IS NOT NULL and "CS_SOLD_DATE_SK" IS NOT NULL

(54) Filter [codegen id : 26]
Input [6]: [CS_BILL_CUSTOMER_SK#1961, CS_EXT_DISCOUNT_AMT#1980, CS_EXT_SALES_PRICE#1981, CS_EXT_WHOLESALE_COST#1982, CS_EXT_LIST_PRICE#1983, CS_SOLD_DATE_SK#1958]
Condition : isnotnull(CS_BILL_CUSTOMER_SK#1961)

(55) Exchange
Input [6]: [CS_BILL_CUSTOMER_SK#1961, CS_EXT_DISCOUNT_AMT#1980, CS_EXT_SALES_PRICE#1981, CS_EXT_WHOLESALE_COST#1982, CS_EXT_LIST_PRICE#1983, CS_SOLD_DATE_SK#1958]
Arguments: hashpartitioning(cs_bill_customer_sk#1961, 5), ENSURE_REQUIREMENTS, [id=#1487]

(56) Sort [codegen id : 27]
Input [6]: [CS_BILL_CUSTOMER_SK#1961, CS_EXT_DISCOUNT_AMT#1980, CS_EXT_SALES_PRICE#1981, CS_EXT_WHOLESALE_COST#1982, CS_EXT_LIST_PRICE#1983, CS_SOLD_DATE_SK#1958]
Arguments: [cs_bill_customer_sk#1961 ASC NULLS FIRST], false, 0

(57) SortMergeJoin [codegen id : 28]
Left keys [1]: [c_customer_sk#1940]
Right keys [1]: [cs_bill_customer_sk#1961]
Join condition: None

(58) Project [codegen id : 28]
Output [12]: [C_CUSTOMER_ID#1941, C_FIRST_NAME#1948, C_LAST_NAME#1949, C_PREFERRED_CUST_FLAG#1950, C_BIRTH_COUNTRY#1954, C_LOGIN#1955, C_EMAIL_ADDRESS#1956, CS_SOLD_DATE_SK#1958, CS_EXT_DISCOUNT_AMT#1980, CS_EXT_SALES_PRICE#1981, CS_EXT_WHOLESALE_COST#1982, CS_EXT_LIST_PRICE#1983]
Input [14]: [C_CUSTOMER_SK#1940, C_CUSTOMER_ID#1941, C_FIRST_NAME#1948, C_LAST_NAME#1949, C_PREFERRED_CUST_FLAG#1950, C_BIRTH_COUNTRY#1954, C_LOGIN#1955, C_EMAIL_ADDRESS#1956, CS_BILL_CUSTOMER_SK#1961, CS_EXT_DISCOUNT_AMT#1980, CS_EXT_SALES_PRICE#1981, CS_EXT_WHOLESALE_COST#1982, CS_EXT_LIST_PRICE#1983, CS_SOLD_DATE_SK#1958]

(59) Exchange
Input [12]: [C_CUSTOMER_ID#1941, C_FIRST_NAME#1948, C_LAST_NAME#1949, C_PREFERRED_CUST_FLAG#1950, C_BIRTH_COUNTRY#1954, C_LOGIN#1955, C_EMAIL_ADDRESS#1956, CS_SOLD_DATE_SK#1958, CS_EXT_DISCOUNT_AMT#1980, CS_EXT_SALES_PRICE#1981, CS_EXT_WHOLESALE_COST#1982, CS_EXT_LIST_PRICE#1983]
Arguments: hashpartitioning(cs_sold_date_sk#1958, 5), ENSURE_REQUIREMENTS, [id=#1495]

(60) Sort [codegen id : 29]
Input [12]: [C_CUSTOMER_ID#1941, C_FIRST_NAME#1948, C_LAST_NAME#1949, C_PREFERRED_CUST_FLAG#1950, C_BIRTH_COUNTRY#1954, C_LOGIN#1955, C_EMAIL_ADDRESS#1956, CS_SOLD_DATE_SK#1958, CS_EXT_DISCOUNT_AMT#1980, CS_EXT_SALES_PRICE#1981, CS_EXT_WHOLESALE_COST#1982, CS_EXT_LIST_PRICE#1983]
Arguments: [cs_sold_date_sk#1958 ASC NULLS FIRST], false, 0

(61) BatchScan
Output [2]: [D_DATE_SK#1992, D_YEAR#1998]
Format: orafile
OraPlan: 00 OraTableScan TPCDS.DATE_DIM, [D_DATE_SK#3031, D_YEAR#3032], [oracolumnref(D_DATE_SK#3031), oracolumnref(D_YEAR#3032)], orabinaryopexpression((isnotnull(D_YEAR#1998) AND (D_YEAR#1998 = 2001.000000000000000000)))
PartitionSchema: struct<>
ReadSchema: struct<D_DATE_SK:decimal(38,18),D_YEAR:decimal(38,18)>
dsKey: DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
oraPushdownBindValues: 2001.000000000000000000
oraPushdownSQL: select "D_DATE_SK", "D_YEAR"
from TPCDS.DATE_DIM
where ("D_YEAR" IS NOT NULL AND ("D_YEAR" = ?))

(62) Filter [codegen id : 30]
Input [2]: [D_DATE_SK#1992, D_YEAR#1998]
Condition : (isnotnull(D_YEAR#1998) AND (D_YEAR#1998 = 2001.000000000000000000))

(63) Exchange
Input [2]: [D_DATE_SK#1992, D_YEAR#1998]
Arguments: hashpartitioning(d_date_sk#1992, 5), ENSURE_REQUIREMENTS, [id=#1503]

(64) Sort [codegen id : 31]
Input [2]: [D_DATE_SK#1992, D_YEAR#1998]
Arguments: [d_date_sk#1992 ASC NULLS FIRST], false, 0

(65) SortMergeJoin [codegen id : 32]
Left keys [1]: [cs_sold_date_sk#1958]
Right keys [1]: [d_date_sk#1992]
Join condition: None

(66) Project [codegen id : 32]
Output [12]: [C_CUSTOMER_ID#1941, C_FIRST_NAME#1948, C_LAST_NAME#1949, C_PREFERRED_CUST_FLAG#1950, C_BIRTH_COUNTRY#1954, C_LOGIN#1955, C_EMAIL_ADDRESS#1956, CS_EXT_DISCOUNT_AMT#1980, CS_EXT_SALES_PRICE#1981, CS_EXT_WHOLESALE_COST#1982, CS_EXT_LIST_PRICE#1983, D_YEAR#1998]
Input [14]: [C_CUSTOMER_ID#1941, C_FIRST_NAME#1948, C_LAST_NAME#1949, C_PREFERRED_CUST_FLAG#1950, C_BIRTH_COUNTRY#1954, C_LOGIN#1955, C_EMAIL_ADDRESS#1956, CS_SOLD_DATE_SK#1958, CS_EXT_DISCOUNT_AMT#1980, CS_EXT_SALES_PRICE#1981, CS_EXT_WHOLESALE_COST#1982, CS_EXT_LIST_PRICE#1983, D_DATE_SK#1992, D_YEAR#1998]

(67) HashAggregate [codegen id : 32]
Input [12]: [C_CUSTOMER_ID#1941, C_FIRST_NAME#1948, C_LAST_NAME#1949, C_PREFERRED_CUST_FLAG#1950, C_BIRTH_COUNTRY#1954, C_LOGIN#1955, C_EMAIL_ADDRESS#1956, CS_EXT_DISCOUNT_AMT#1980, CS_EXT_SALES_PRICE#1981, CS_EXT_WHOLESALE_COST#1982, CS_EXT_LIST_PRICE#1983, D_YEAR#1998]
Keys [8]: [c_customer_id#1941, c_first_name#1948, c_last_name#1949, c_preferred_cust_flag#1950, c_birth_country#1954, c_login#1955, c_email_address#1956, d_year#1998]
Functions [1]: [partial_sum(CheckOverflow((promote_precision(CheckOverflow((promote_precision(cast(CheckOverflow((promote_precision(cast(CheckOverflow((promote_precision(cast(cs_ext_list_price#1983 as decimal(38,17))) - promote_precision(cast(cs_ext_wholesale_cost#1982 as decimal(38,17)))), DecimalType(38,17), true) as decimal(38,16))) - promote_precision(cast(cs_ext_discount_amt#1980 as decimal(38,16)))), DecimalType(38,16), true) as decimal(38,15))) + promote_precision(cast(cs_ext_sales_price#1981 as decimal(38,15)))), DecimalType(38,15), true)) / 2.000000000000000), DecimalType(38,15), true))]
Aggregate Attributes [2]: [sum#3251, isEmpty#3252]
Results [10]: [c_customer_id#1941, c_first_name#1948, c_last_name#1949, c_preferred_cust_flag#1950, c_birth_country#1954, c_login#1955, c_email_address#1956, d_year#1998, sum#3253, isEmpty#3254]

(68) Exchange
Input [10]: [c_customer_id#1941, c_first_name#1948, c_last_name#1949, c_preferred_cust_flag#1950, c_birth_country#1954, c_login#1955, c_email_address#1956, d_year#1998, sum#3253, isEmpty#3254]
Arguments: hashpartitioning(c_customer_id#1941, c_first_name#1948, c_last_name#1949, c_preferred_cust_flag#1950, c_birth_country#1954, c_login#1955, c_email_address#1956, d_year#1998, 5), ENSURE_REQUIREMENTS, [id=#1512]

(69) HashAggregate [codegen id : 33]
Input [10]: [c_customer_id#1941, c_first_name#1948, c_last_name#1949, c_preferred_cust_flag#1950, c_birth_country#1954, c_login#1955, c_email_address#1956, d_year#1998, sum#3253, isEmpty#3254]
Keys [8]: [c_customer_id#1941, c_first_name#1948, c_last_name#1949, c_preferred_cust_flag#1950, c_birth_country#1954, c_login#1955, c_email_address#1956, d_year#1998]
Functions [1]: [sum(CheckOverflow((promote_precision(CheckOverflow((promote_precision(cast(CheckOverflow((promote_precision(cast(CheckOverflow((promote_precision(cast(cs_ext_list_price#1983 as decimal(38,17))) - promote_precision(cast(cs_ext_wholesale_cost#1982 as decimal(38,17)))), DecimalType(38,17), true) as decimal(38,16))) - promote_precision(cast(cs_ext_discount_amt#1980 as decimal(38,16)))), DecimalType(38,16), true) as decimal(38,15))) + promote_precision(cast(cs_ext_sales_price#1981 as decimal(38,15)))), DecimalType(38,15), true)) / 2.000000000000000), DecimalType(38,15), true))]
Aggregate Attributes [1]: [sum(CheckOverflow((promote_precision(CheckOverflow((promote_precision(cast(CheckOverflow((promote_precision(cast(CheckOverflow((promote_precision(cast(cs_ext_list_price#1983 as decimal(38,17))) - promote_precision(cast(cs_ext_wholesale_cost#1982 as decimal(38,17)))), DecimalType(38,17), true) as decimal(38,16))) - promote_precision(cast(cs_ext_discount_amt#1980 as decimal(38,16)))), DecimalType(38,16), true) as decimal(38,15))) + promote_precision(cast(cs_ext_sales_price#1981 as decimal(38,15)))), DecimalType(38,15), true)) / 2.000000000000000), DecimalType(38,15), true))#2794]
Results [2]: [c_customer_id#1941 AS customer_id#1393, sum(CheckOverflow((promote_precision(CheckOverflow((promote_precision(cast(CheckOverflow((promote_precision(cast(CheckOverflow((promote_precision(cast(cs_ext_list_price#1983 as decimal(38,17))) - promote_precision(cast(cs_ext_wholesale_cost#1982 as decimal(38,17)))), DecimalType(38,17), true) as decimal(38,16))) - promote_precision(cast(cs_ext_discount_amt#1980 as decimal(38,16)))), DecimalType(38,16), true) as decimal(38,15))) + promote_precision(cast(cs_ext_sales_price#1981 as decimal(38,15)))), DecimalType(38,15), true)) / 2.000000000000000), DecimalType(38,15), true))#2794 AS year_total#1401]

(70) Filter [codegen id : 33]
Input [2]: [customer_id#1393, year_total#1401]
Condition : (isnotnull(year_total#1401) AND (year_total#1401 > 0E-15))

(71) Project [codegen id : 33]
Output [2]: [customer_id#1393 AS customer_id#2815, year_total#1401 AS year_total#2823]
Input [2]: [customer_id#1393, year_total#1401]

(72) Exchange
Input [2]: [customer_id#2815, year_total#2823]
Arguments: hashpartitioning(customer_id#2815, 5), ENSURE_REQUIREMENTS, [id=#1518]

(73) Sort [codegen id : 34]
Input [2]: [customer_id#2815, year_total#2823]
Arguments: [customer_id#2815 ASC NULLS FIRST], false, 0

(74) SortMergeJoin [codegen id : 35]
Left keys [1]: [customer_id#1383]
Right keys [1]: [customer_id#2815]
Join condition: None

(75) Project [codegen id : 35]
Output [8]: [customer_id#1383, year_total#1391, customer_id#2805, customer_first_name#2806, customer_last_name#2807, customer_preferred_cust_flag#2808, year_total#2813, year_total#2823]
Input [9]: [customer_id#1383, year_total#1391, customer_id#2805, customer_first_name#2806, customer_last_name#2807, customer_preferred_cust_flag#2808, year_total#2813, customer_id#2815, year_total#2823]

(76) BatchScan
Output [8]: [C_CUSTOMER_SK#2169, C_CUSTOMER_ID#2170, C_FIRST_NAME#2177, C_LAST_NAME#2178, C_PREFERRED_CUST_FLAG#2179, C_BIRTH_COUNTRY#2183, C_LOGIN#2184, C_EMAIL_ADDRESS#2185]
Format: orafile
OraPlan: 00 OraTableScan TPCDS.CUSTOMER, [C_CUSTOMER_SK#3067, C_CUSTOMER_ID#3068, C_FIRST_NAME#3069, C_LAST_NAME#3070, C_PREFERRED_CUST_FLAG#3071, C_BIRTH_COUNTRY#3072, C_LOGIN#3073, C_EMAIL_ADDRESS#3074], [oracolumnref(C_CUSTOMER_SK#3067), oracolumnref(C_CUSTOMER_ID#3068), oracolumnref(C_FIRST_NAME#3069), oracolumnref(C_LAST_NAME#3070), oracolumnref(C_PREFERRED_CUST_FLAG#3071), oracolumnref(C_BIRTH_COUNTRY#3072), oracolumnref(C_LOGIN#3073), oracolumnref(C_EMAIL_ADDRESS#3074)]
PartitionSchema: struct<>
ReadSchema: struct<C_CUSTOMER_SK:decimal(38,18),C_CUSTOMER_ID:string,C_FIRST_NAME:string,C_LAST_NAME:string,C_PREFERRED_CUST_FLAG:string,C_BIRTH_COUNTRY:string,C_LOGIN:string,C_EMAIL_ADDRESS:string>
dsKey: DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
oraPushdownSQL: select "C_CUSTOMER_SK", "C_CUSTOMER_ID", "C_FIRST_NAME", "C_LAST_NAME", "C_PREFERRED_CUST_FLAG", "C_BIRTH_COUNTRY", "C_LOGIN", "C_EMAIL_ADDRESS"
from TPCDS.CUSTOMER

(77) Project [codegen id : 36]
Output [8]: [C_CUSTOMER_SK#2169, C_CUSTOMER_ID#2170, C_FIRST_NAME#2177, C_LAST_NAME#2178, C_PREFERRED_CUST_FLAG#2179, C_BIRTH_COUNTRY#2183, C_LOGIN#2184, C_EMAIL_ADDRESS#2185]
Input [8]: [C_CUSTOMER_SK#2169, C_CUSTOMER_ID#2170, C_FIRST_NAME#2177, C_LAST_NAME#2178, C_PREFERRED_CUST_FLAG#2179, C_BIRTH_COUNTRY#2183, C_LOGIN#2184, C_EMAIL_ADDRESS#2185]

(78) Exchange
Input [8]: [C_CUSTOMER_SK#2169, C_CUSTOMER_ID#2170, C_FIRST_NAME#2177, C_LAST_NAME#2178, C_PREFERRED_CUST_FLAG#2179, C_BIRTH_COUNTRY#2183, C_LOGIN#2184, C_EMAIL_ADDRESS#2185]
Arguments: hashpartitioning(c_customer_sk#2169, 5), ENSURE_REQUIREMENTS, [id=#1530]

(79) Sort [codegen id : 37]
Input [8]: [C_CUSTOMER_SK#2169, C_CUSTOMER_ID#2170, C_FIRST_NAME#2177, C_LAST_NAME#2178, C_PREFERRED_CUST_FLAG#2179, C_BIRTH_COUNTRY#2183, C_LOGIN#2184, C_EMAIL_ADDRESS#2185]
Arguments: [c_customer_sk#2169 ASC NULLS FIRST], false, 0

(80) BatchScan
Output [6]: [CS_BILL_CUSTOMER_SK#2190, CS_EXT_DISCOUNT_AMT#2209, CS_EXT_SALES_PRICE#2210, CS_EXT_WHOLESALE_COST#2211, CS_EXT_LIST_PRICE#2212, CS_SOLD_DATE_SK#2187]
Format: orafile
OraPlan: 00 OraTableScan TPCDS.CATALOG_SALES, [CS_BILL_CUSTOMER_SK#3083, CS_EXT_DISCOUNT_AMT#3084, CS_EXT_SALES_PRICE#3085, CS_EXT_WHOLESALE_COST#3086, CS_EXT_LIST_PRICE#3087, CS_SOLD_DATE_SK#3088], [oracolumnref(CS_BILL_CUSTOMER_SK#3083), oracolumnref(CS_EXT_DISCOUNT_AMT#3084), oracolumnref(CS_EXT_SALES_PRICE#3085), oracolumnref(CS_EXT_WHOLESALE_COST#3086), oracolumnref(CS_EXT_LIST_PRICE#3087), oracolumnref(CS_SOLD_DATE_SK#3088)], orapostfixunaryopexpression(isnotnull(CS_BILL_CUSTOMER_SK#2190))
PartitionSchema: struct<CS_SOLD_DATE_SK:decimal(38,18)>
ReadSchema: struct<CS_BILL_CUSTOMER_SK:decimal(38,18),CS_EXT_DISCOUNT_AMT:decimal(38,18),CS_EXT_SALES_PRICE:decimal(38,18),CS_EXT_WHOLESALE_COST:decimal(38,18),CS_EXT_LIST_PRICE:decimal(38,18)>
dsKey: DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
oraPushdownSQL: select "CS_BILL_CUSTOMER_SK", "CS_EXT_DISCOUNT_AMT", "CS_EXT_SALES_PRICE", "CS_EXT_WHOLESALE_COST", "CS_EXT_LIST_PRICE", "CS_SOLD_DATE_SK"
from TPCDS.CATALOG_SALES
where "CS_BILL_CUSTOMER_SK" IS NOT NULL and "CS_SOLD_DATE_SK" IS NOT NULL

(81) Filter [codegen id : 38]
Input [6]: [CS_BILL_CUSTOMER_SK#2190, CS_EXT_DISCOUNT_AMT#2209, CS_EXT_SALES_PRICE#2210, CS_EXT_WHOLESALE_COST#2211, CS_EXT_LIST_PRICE#2212, CS_SOLD_DATE_SK#2187]
Condition : isnotnull(CS_BILL_CUSTOMER_SK#2190)

(82) Exchange
Input [6]: [CS_BILL_CUSTOMER_SK#2190, CS_EXT_DISCOUNT_AMT#2209, CS_EXT_SALES_PRICE#2210, CS_EXT_WHOLESALE_COST#2211, CS_EXT_LIST_PRICE#2212, CS_SOLD_DATE_SK#2187]
Arguments: hashpartitioning(cs_bill_customer_sk#2190, 5), ENSURE_REQUIREMENTS, [id=#1538]

(83) Sort [codegen id : 39]
Input [6]: [CS_BILL_CUSTOMER_SK#2190, CS_EXT_DISCOUNT_AMT#2209, CS_EXT_SALES_PRICE#2210, CS_EXT_WHOLESALE_COST#2211, CS_EXT_LIST_PRICE#2212, CS_SOLD_DATE_SK#2187]
Arguments: [cs_bill_customer_sk#2190 ASC NULLS FIRST], false, 0

(84) SortMergeJoin [codegen id : 40]
Left keys [1]: [c_customer_sk#2169]
Right keys [1]: [cs_bill_customer_sk#2190]
Join condition: None

(85) Project [codegen id : 40]
Output [12]: [C_CUSTOMER_ID#2170, C_FIRST_NAME#2177, C_LAST_NAME#2178, C_PREFERRED_CUST_FLAG#2179, C_BIRTH_COUNTRY#2183, C_LOGIN#2184, C_EMAIL_ADDRESS#2185, CS_SOLD_DATE_SK#2187, CS_EXT_DISCOUNT_AMT#2209, CS_EXT_SALES_PRICE#2210, CS_EXT_WHOLESALE_COST#2211, CS_EXT_LIST_PRICE#2212]
Input [14]: [C_CUSTOMER_SK#2169, C_CUSTOMER_ID#2170, C_FIRST_NAME#2177, C_LAST_NAME#2178, C_PREFERRED_CUST_FLAG#2179, C_BIRTH_COUNTRY#2183, C_LOGIN#2184, C_EMAIL_ADDRESS#2185, CS_BILL_CUSTOMER_SK#2190, CS_EXT_DISCOUNT_AMT#2209, CS_EXT_SALES_PRICE#2210, CS_EXT_WHOLESALE_COST#2211, CS_EXT_LIST_PRICE#2212, CS_SOLD_DATE_SK#2187]

(86) Exchange
Input [12]: [C_CUSTOMER_ID#2170, C_FIRST_NAME#2177, C_LAST_NAME#2178, C_PREFERRED_CUST_FLAG#2179, C_BIRTH_COUNTRY#2183, C_LOGIN#2184, C_EMAIL_ADDRESS#2185, CS_SOLD_DATE_SK#2187, CS_EXT_DISCOUNT_AMT#2209, CS_EXT_SALES_PRICE#2210, CS_EXT_WHOLESALE_COST#2211, CS_EXT_LIST_PRICE#2212]
Arguments: hashpartitioning(cs_sold_date_sk#2187, 5), ENSURE_REQUIREMENTS, [id=#1546]

(87) Sort [codegen id : 41]
Input [12]: [C_CUSTOMER_ID#2170, C_FIRST_NAME#2177, C_LAST_NAME#2178, C_PREFERRED_CUST_FLAG#2179, C_BIRTH_COUNTRY#2183, C_LOGIN#2184, C_EMAIL_ADDRESS#2185, CS_SOLD_DATE_SK#2187, CS_EXT_DISCOUNT_AMT#2209, CS_EXT_SALES_PRICE#2210, CS_EXT_WHOLESALE_COST#2211, CS_EXT_LIST_PRICE#2212]
Arguments: [cs_sold_date_sk#2187 ASC NULLS FIRST], false, 0

(88) BatchScan
Output [2]: [D_DATE_SK#2221, D_YEAR#2227]
Format: orafile
OraPlan: 00 OraTableScan TPCDS.DATE_DIM, [D_DATE_SK#3095, D_YEAR#3096], [oracolumnref(D_DATE_SK#3095), oracolumnref(D_YEAR#3096)], orabinaryopexpression((isnotnull(D_YEAR#2227) AND (D_YEAR#2227 = 2002.000000000000000000)))
PartitionSchema: struct<>
ReadSchema: struct<D_DATE_SK:decimal(38,18),D_YEAR:decimal(38,18)>
dsKey: DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
oraPushdownBindValues: 2002.000000000000000000
oraPushdownSQL: select "D_DATE_SK", "D_YEAR"
from TPCDS.DATE_DIM
where ("D_YEAR" IS NOT NULL AND ("D_YEAR" = ?))

(89) Filter [codegen id : 42]
Input [2]: [D_DATE_SK#2221, D_YEAR#2227]
Condition : (isnotnull(D_YEAR#2227) AND (D_YEAR#2227 = 2002.000000000000000000))

(90) Exchange
Input [2]: [D_DATE_SK#2221, D_YEAR#2227]
Arguments: hashpartitioning(d_date_sk#2221, 5), ENSURE_REQUIREMENTS, [id=#1554]

(91) Sort [codegen id : 43]
Input [2]: [D_DATE_SK#2221, D_YEAR#2227]
Arguments: [d_date_sk#2221 ASC NULLS FIRST], false, 0

(92) SortMergeJoin [codegen id : 44]
Left keys [1]: [cs_sold_date_sk#2187]
Right keys [1]: [d_date_sk#2221]
Join condition: None

(93) Project [codegen id : 44]
Output [12]: [C_CUSTOMER_ID#2170, C_FIRST_NAME#2177, C_LAST_NAME#2178, C_PREFERRED_CUST_FLAG#2179, C_BIRTH_COUNTRY#2183, C_LOGIN#2184, C_EMAIL_ADDRESS#2185, CS_EXT_DISCOUNT_AMT#2209, CS_EXT_SALES_PRICE#2210, CS_EXT_WHOLESALE_COST#2211, CS_EXT_LIST_PRICE#2212, D_YEAR#2227]
Input [14]: [C_CUSTOMER_ID#2170, C_FIRST_NAME#2177, C_LAST_NAME#2178, C_PREFERRED_CUST_FLAG#2179, C_BIRTH_COUNTRY#2183, C_LOGIN#2184, C_EMAIL_ADDRESS#2185, CS_SOLD_DATE_SK#2187, CS_EXT_DISCOUNT_AMT#2209, CS_EXT_SALES_PRICE#2210, CS_EXT_WHOLESALE_COST#2211, CS_EXT_LIST_PRICE#2212, D_DATE_SK#2221, D_YEAR#2227]

(94) HashAggregate [codegen id : 44]
Input [12]: [C_CUSTOMER_ID#2170, C_FIRST_NAME#2177, C_LAST_NAME#2178, C_PREFERRED_CUST_FLAG#2179, C_BIRTH_COUNTRY#2183, C_LOGIN#2184, C_EMAIL_ADDRESS#2185, CS_EXT_DISCOUNT_AMT#2209, CS_EXT_SALES_PRICE#2210, CS_EXT_WHOLESALE_COST#2211, CS_EXT_LIST_PRICE#2212, D_YEAR#2227]
Keys [8]: [c_customer_id#2170, c_first_name#2177, c_last_name#2178, c_preferred_cust_flag#2179, c_birth_country#2183, c_login#2184, c_email_address#2185, d_year#2227]
Functions [1]: [partial_sum(CheckOverflow((promote_precision(CheckOverflow((promote_precision(cast(CheckOverflow((promote_precision(cast(CheckOverflow((promote_precision(cast(cs_ext_list_price#2212 as decimal(38,17))) - promote_precision(cast(cs_ext_wholesale_cost#2211 as decimal(38,17)))), DecimalType(38,17), true) as decimal(38,16))) - promote_precision(cast(cs_ext_discount_amt#2209 as decimal(38,16)))), DecimalType(38,16), true) as decimal(38,15))) + promote_precision(cast(cs_ext_sales_price#2210 as decimal(38,15)))), DecimalType(38,15), true)) / 2.000000000000000), DecimalType(38,15), true))]
Aggregate Attributes [2]: [sum#3255, isEmpty#3256]
Results [10]: [c_customer_id#2170, c_first_name#2177, c_last_name#2178, c_preferred_cust_flag#2179, c_birth_country#2183, c_login#2184, c_email_address#2185, d_year#2227, sum#3257, isEmpty#3258]

(95) Exchange
Input [10]: [c_customer_id#2170, c_first_name#2177, c_last_name#2178, c_preferred_cust_flag#2179, c_birth_country#2183, c_login#2184, c_email_address#2185, d_year#2227, sum#3257, isEmpty#3258]
Arguments: hashpartitioning(c_customer_id#2170, c_first_name#2177, c_last_name#2178, c_preferred_cust_flag#2179, c_birth_country#2183, c_login#2184, c_email_address#2185, d_year#2227, 5), ENSURE_REQUIREMENTS, [id=#1563]

(96) HashAggregate [codegen id : 45]
Input [10]: [c_customer_id#2170, c_first_name#2177, c_last_name#2178, c_preferred_cust_flag#2179, c_birth_country#2183, c_login#2184, c_email_address#2185, d_year#2227, sum#3257, isEmpty#3258]
Keys [8]: [c_customer_id#2170, c_first_name#2177, c_last_name#2178, c_preferred_cust_flag#2179, c_birth_country#2183, c_login#2184, c_email_address#2185, d_year#2227]
Functions [1]: [sum(CheckOverflow((promote_precision(CheckOverflow((promote_precision(cast(CheckOverflow((promote_precision(cast(CheckOverflow((promote_precision(cast(cs_ext_list_price#2212 as decimal(38,17))) - promote_precision(cast(cs_ext_wholesale_cost#2211 as decimal(38,17)))), DecimalType(38,17), true) as decimal(38,16))) - promote_precision(cast(cs_ext_discount_amt#2209 as decimal(38,16)))), DecimalType(38,16), true) as decimal(38,15))) + promote_precision(cast(cs_ext_sales_price#2210 as decimal(38,15)))), DecimalType(38,15), true)) / 2.000000000000000), DecimalType(38,15), true))]
Aggregate Attributes [1]: [sum(CheckOverflow((promote_precision(CheckOverflow((promote_precision(cast(CheckOverflow((promote_precision(cast(CheckOverflow((promote_precision(cast(cs_ext_list_price#2212 as decimal(38,17))) - promote_precision(cast(cs_ext_wholesale_cost#2211 as decimal(38,17)))), DecimalType(38,17), true) as decimal(38,16))) - promote_precision(cast(cs_ext_discount_amt#2209 as decimal(38,16)))), DecimalType(38,16), true) as decimal(38,15))) + promote_precision(cast(cs_ext_sales_price#2210 as decimal(38,15)))), DecimalType(38,15), true)) / 2.000000000000000), DecimalType(38,15), true))#2797]
Results [2]: [c_customer_id#2170 AS customer_id#2825, sum(CheckOverflow((promote_precision(CheckOverflow((promote_precision(cast(CheckOverflow((promote_precision(cast(CheckOverflow((promote_precision(cast(cs_ext_list_price#2212 as decimal(38,17))) - promote_precision(cast(cs_ext_wholesale_cost#2211 as decimal(38,17)))), DecimalType(38,17), true) as decimal(38,16))) - promote_precision(cast(cs_ext_discount_amt#2209 as decimal(38,16)))), DecimalType(38,16), true) as decimal(38,15))) + promote_precision(cast(cs_ext_sales_price#2210 as decimal(38,15)))), DecimalType(38,15), true)) / 2.000000000000000), DecimalType(38,15), true))#2797 AS year_total#2833]

(97) Exchange
Input [2]: [customer_id#2825, year_total#2833]
Arguments: hashpartitioning(customer_id#2825, 5), ENSURE_REQUIREMENTS, [id=#1567]

(98) Sort [codegen id : 46]
Input [2]: [customer_id#2825, year_total#2833]
Arguments: [customer_id#2825 ASC NULLS FIRST], false, 0

(99) SortMergeJoin [codegen id : 47]
Left keys [1]: [customer_id#1383]
Right keys [1]: [customer_id#2825]
Join condition: (CASE WHEN (year_total#2823 > 0E-15) THEN CheckOverflow((promote_precision(year_total#2833) / promote_precision(year_total#2823)), DecimalType(38,6), true) ELSE null END > CASE WHEN (year_total#1391 > 0E-15) THEN CheckOverflow((promote_precision(year_total#2813) / promote_precision(year_total#1391)), DecimalType(38,6), true) ELSE null END)

(100) Project [codegen id : 47]
Output [7]: [customer_id#1383, customer_id#2805, customer_first_name#2806, customer_last_name#2807, customer_preferred_cust_flag#2808, year_total#2823, year_total#2833]
Input [10]: [customer_id#1383, year_total#1391, customer_id#2805, customer_first_name#2806, customer_last_name#2807, customer_preferred_cust_flag#2808, year_total#2813, year_total#2823, customer_id#2825, year_total#2833]

(101) BatchScan
Output [8]: [C_CUSTOMER_SK#2478, C_CUSTOMER_ID#2479, C_FIRST_NAME#2486, C_LAST_NAME#2487, C_PREFERRED_CUST_FLAG#2488, C_BIRTH_COUNTRY#2492, C_LOGIN#2493, C_EMAIL_ADDRESS#2494]
Format: orafile
OraPlan: 00 OraTableScan TPCDS.CUSTOMER, [C_CUSTOMER_SK#3147, C_CUSTOMER_ID#3148, C_FIRST_NAME#3149, C_LAST_NAME#3150, C_PREFERRED_CUST_FLAG#3151, C_BIRTH_COUNTRY#3152, C_LOGIN#3153, C_EMAIL_ADDRESS#3154], [oracolumnref(C_CUSTOMER_SK#3147), oracolumnref(C_CUSTOMER_ID#3148), oracolumnref(C_FIRST_NAME#3149), oracolumnref(C_LAST_NAME#3150), oracolumnref(C_PREFERRED_CUST_FLAG#3151), oracolumnref(C_BIRTH_COUNTRY#3152), oracolumnref(C_LOGIN#3153), oracolumnref(C_EMAIL_ADDRESS#3154)]
PartitionSchema: struct<>
ReadSchema: struct<C_CUSTOMER_SK:decimal(38,18),C_CUSTOMER_ID:string,C_FIRST_NAME:string,C_LAST_NAME:string,C_PREFERRED_CUST_FLAG:string,C_BIRTH_COUNTRY:string,C_LOGIN:string,C_EMAIL_ADDRESS:string>
dsKey: DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
oraPushdownSQL: select "C_CUSTOMER_SK", "C_CUSTOMER_ID", "C_FIRST_NAME", "C_LAST_NAME", "C_PREFERRED_CUST_FLAG", "C_BIRTH_COUNTRY", "C_LOGIN", "C_EMAIL_ADDRESS"
from TPCDS.CUSTOMER

(102) Project [codegen id : 48]
Output [8]: [C_CUSTOMER_SK#2478, C_CUSTOMER_ID#2479, C_FIRST_NAME#2486, C_LAST_NAME#2487, C_PREFERRED_CUST_FLAG#2488, C_BIRTH_COUNTRY#2492, C_LOGIN#2493, C_EMAIL_ADDRESS#2494]
Input [8]: [C_CUSTOMER_SK#2478, C_CUSTOMER_ID#2479, C_FIRST_NAME#2486, C_LAST_NAME#2487, C_PREFERRED_CUST_FLAG#2488, C_BIRTH_COUNTRY#2492, C_LOGIN#2493, C_EMAIL_ADDRESS#2494]

(103) Exchange
Input [8]: [C_CUSTOMER_SK#2478, C_CUSTOMER_ID#2479, C_FIRST_NAME#2486, C_LAST_NAME#2487, C_PREFERRED_CUST_FLAG#2488, C_BIRTH_COUNTRY#2492, C_LOGIN#2493, C_EMAIL_ADDRESS#2494]
Arguments: hashpartitioning(c_customer_sk#2478, 5), ENSURE_REQUIREMENTS, [id=#1579]

(104) Sort [codegen id : 49]
Input [8]: [C_CUSTOMER_SK#2478, C_CUSTOMER_ID#2479, C_FIRST_NAME#2486, C_LAST_NAME#2487, C_PREFERRED_CUST_FLAG#2488, C_BIRTH_COUNTRY#2492, C_LOGIN#2493, C_EMAIL_ADDRESS#2494]
Arguments: [c_customer_sk#2478 ASC NULLS FIRST], false, 0

(105) BatchScan
Output [6]: [WS_BILL_CUSTOMER_SK#2500, WS_EXT_DISCOUNT_AMT#2518, WS_EXT_SALES_PRICE#2519, WS_EXT_WHOLESALE_COST#2520, WS_EXT_LIST_PRICE#2521, WS_SOLD_DATE_SK#2496]
Format: orafile
OraPlan: 00 OraTableScan TPCDS.WEB_SALES, [WS_BILL_CUSTOMER_SK#3163, WS_EXT_DISCOUNT_AMT#3164, WS_EXT_SALES_PRICE#3165, WS_EXT_WHOLESALE_COST#3166, WS_EXT_LIST_PRICE#3167, WS_SOLD_DATE_SK#3168], [oracolumnref(WS_BILL_CUSTOMER_SK#3163), oracolumnref(WS_EXT_DISCOUNT_AMT#3164), oracolumnref(WS_EXT_SALES_PRICE#3165), oracolumnref(WS_EXT_WHOLESALE_COST#3166), oracolumnref(WS_EXT_LIST_PRICE#3167), oracolumnref(WS_SOLD_DATE_SK#3168)], orapostfixunaryopexpression(isnotnull(WS_BILL_CUSTOMER_SK#2500))
PartitionSchema: struct<WS_SOLD_DATE_SK:decimal(38,18)>
ReadSchema: struct<WS_BILL_CUSTOMER_SK:decimal(38,18),WS_EXT_DISCOUNT_AMT:decimal(38,18),WS_EXT_SALES_PRICE:decimal(38,18),WS_EXT_WHOLESALE_COST:decimal(38,18),WS_EXT_LIST_PRICE:decimal(38,18)>
dsKey: DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
oraPushdownSQL: select "WS_BILL_CUSTOMER_SK", "WS_EXT_DISCOUNT_AMT", "WS_EXT_SALES_PRICE", "WS_EXT_WHOLESALE_COST", "WS_EXT_LIST_PRICE", "WS_SOLD_DATE_SK"
from TPCDS.WEB_SALES
where "WS_BILL_CUSTOMER_SK" IS NOT NULL and "WS_SOLD_DATE_SK" IS NOT NULL

(106) Filter [codegen id : 50]
Input [6]: [WS_BILL_CUSTOMER_SK#2500, WS_EXT_DISCOUNT_AMT#2518, WS_EXT_SALES_PRICE#2519, WS_EXT_WHOLESALE_COST#2520, WS_EXT_LIST_PRICE#2521, WS_SOLD_DATE_SK#2496]
Condition : isnotnull(WS_BILL_CUSTOMER_SK#2500)

(107) Exchange
Input [6]: [WS_BILL_CUSTOMER_SK#2500, WS_EXT_DISCOUNT_AMT#2518, WS_EXT_SALES_PRICE#2519, WS_EXT_WHOLESALE_COST#2520, WS_EXT_LIST_PRICE#2521, WS_SOLD_DATE_SK#2496]
Arguments: hashpartitioning(ws_bill_customer_sk#2500, 5), ENSURE_REQUIREMENTS, [id=#1587]

(108) Sort [codegen id : 51]
Input [6]: [WS_BILL_CUSTOMER_SK#2500, WS_EXT_DISCOUNT_AMT#2518, WS_EXT_SALES_PRICE#2519, WS_EXT_WHOLESALE_COST#2520, WS_EXT_LIST_PRICE#2521, WS_SOLD_DATE_SK#2496]
Arguments: [ws_bill_customer_sk#2500 ASC NULLS FIRST], false, 0

(109) SortMergeJoin [codegen id : 52]
Left keys [1]: [c_customer_sk#2478]
Right keys [1]: [ws_bill_customer_sk#2500]
Join condition: None

(110) Project [codegen id : 52]
Output [12]: [C_CUSTOMER_ID#2479, C_FIRST_NAME#2486, C_LAST_NAME#2487, C_PREFERRED_CUST_FLAG#2488, C_BIRTH_COUNTRY#2492, C_LOGIN#2493, C_EMAIL_ADDRESS#2494, WS_SOLD_DATE_SK#2496, WS_EXT_DISCOUNT_AMT#2518, WS_EXT_SALES_PRICE#2519, WS_EXT_WHOLESALE_COST#2520, WS_EXT_LIST_PRICE#2521]
Input [14]: [C_CUSTOMER_SK#2478, C_CUSTOMER_ID#2479, C_FIRST_NAME#2486, C_LAST_NAME#2487, C_PREFERRED_CUST_FLAG#2488, C_BIRTH_COUNTRY#2492, C_LOGIN#2493, C_EMAIL_ADDRESS#2494, WS_BILL_CUSTOMER_SK#2500, WS_EXT_DISCOUNT_AMT#2518, WS_EXT_SALES_PRICE#2519, WS_EXT_WHOLESALE_COST#2520, WS_EXT_LIST_PRICE#2521, WS_SOLD_DATE_SK#2496]

(111) Exchange
Input [12]: [C_CUSTOMER_ID#2479, C_FIRST_NAME#2486, C_LAST_NAME#2487, C_PREFERRED_CUST_FLAG#2488, C_BIRTH_COUNTRY#2492, C_LOGIN#2493, C_EMAIL_ADDRESS#2494, WS_SOLD_DATE_SK#2496, WS_EXT_DISCOUNT_AMT#2518, WS_EXT_SALES_PRICE#2519, WS_EXT_WHOLESALE_COST#2520, WS_EXT_LIST_PRICE#2521]
Arguments: hashpartitioning(ws_sold_date_sk#2496, 5), ENSURE_REQUIREMENTS, [id=#1595]

(112) Sort [codegen id : 53]
Input [12]: [C_CUSTOMER_ID#2479, C_FIRST_NAME#2486, C_LAST_NAME#2487, C_PREFERRED_CUST_FLAG#2488, C_BIRTH_COUNTRY#2492, C_LOGIN#2493, C_EMAIL_ADDRESS#2494, WS_SOLD_DATE_SK#2496, WS_EXT_DISCOUNT_AMT#2518, WS_EXT_SALES_PRICE#2519, WS_EXT_WHOLESALE_COST#2520, WS_EXT_LIST_PRICE#2521]
Arguments: [ws_sold_date_sk#2496 ASC NULLS FIRST], false, 0

(113) BatchScan
Output [2]: [D_DATE_SK#2530, D_YEAR#2536]
Format: orafile
OraPlan: 00 OraTableScan TPCDS.DATE_DIM, [D_DATE_SK#3175, D_YEAR#3176], [oracolumnref(D_DATE_SK#3175), oracolumnref(D_YEAR#3176)], orabinaryopexpression((isnotnull(D_YEAR#2536) AND (D_YEAR#2536 = 2001.000000000000000000)))
PartitionSchema: struct<>
ReadSchema: struct<D_DATE_SK:decimal(38,18),D_YEAR:decimal(38,18)>
dsKey: DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
oraPushdownBindValues: 2001.000000000000000000
oraPushdownSQL: select "D_DATE_SK", "D_YEAR"
from TPCDS.DATE_DIM
where ("D_YEAR" IS NOT NULL AND ("D_YEAR" = ?))

(114) Filter [codegen id : 54]
Input [2]: [D_DATE_SK#2530, D_YEAR#2536]
Condition : (isnotnull(D_YEAR#2536) AND (D_YEAR#2536 = 2001.000000000000000000))

(115) Exchange
Input [2]: [D_DATE_SK#2530, D_YEAR#2536]
Arguments: hashpartitioning(d_date_sk#2530, 5), ENSURE_REQUIREMENTS, [id=#1603]

(116) Sort [codegen id : 55]
Input [2]: [D_DATE_SK#2530, D_YEAR#2536]
Arguments: [d_date_sk#2530 ASC NULLS FIRST], false, 0

(117) SortMergeJoin [codegen id : 56]
Left keys [1]: [ws_sold_date_sk#2496]
Right keys [1]: [d_date_sk#2530]
Join condition: None

(118) Project [codegen id : 56]
Output [12]: [C_CUSTOMER_ID#2479, C_FIRST_NAME#2486, C_LAST_NAME#2487, C_PREFERRED_CUST_FLAG#2488, C_BIRTH_COUNTRY#2492, C_LOGIN#2493, C_EMAIL_ADDRESS#2494, WS_EXT_DISCOUNT_AMT#2518, WS_EXT_SALES_PRICE#2519, WS_EXT_WHOLESALE_COST#2520, WS_EXT_LIST_PRICE#2521, D_YEAR#2536]
Input [14]: [C_CUSTOMER_ID#2479, C_FIRST_NAME#2486, C_LAST_NAME#2487, C_PREFERRED_CUST_FLAG#2488, C_BIRTH_COUNTRY#2492, C_LOGIN#2493, C_EMAIL_ADDRESS#2494, WS_SOLD_DATE_SK#2496, WS_EXT_DISCOUNT_AMT#2518, WS_EXT_SALES_PRICE#2519, WS_EXT_WHOLESALE_COST#2520, WS_EXT_LIST_PRICE#2521, D_DATE_SK#2530, D_YEAR#2536]

(119) HashAggregate [codegen id : 56]
Input [12]: [C_CUSTOMER_ID#2479, C_FIRST_NAME#2486, C_LAST_NAME#2487, C_PREFERRED_CUST_FLAG#2488, C_BIRTH_COUNTRY#2492, C_LOGIN#2493, C_EMAIL_ADDRESS#2494, WS_EXT_DISCOUNT_AMT#2518, WS_EXT_SALES_PRICE#2519, WS_EXT_WHOLESALE_COST#2520, WS_EXT_LIST_PRICE#2521, D_YEAR#2536]
Keys [8]: [c_customer_id#2479, c_first_name#2486, c_last_name#2487, c_preferred_cust_flag#2488, c_birth_country#2492, c_login#2493, c_email_address#2494, d_year#2536]
Functions [1]: [partial_sum(CheckOverflow((promote_precision(CheckOverflow((promote_precision(cast(CheckOverflow((promote_precision(cast(CheckOverflow((promote_precision(cast(ws_ext_list_price#2521 as decimal(38,17))) - promote_precision(cast(ws_ext_wholesale_cost#2520 as decimal(38,17)))), DecimalType(38,17), true) as decimal(38,16))) - promote_precision(cast(ws_ext_discount_amt#2518 as decimal(38,16)))), DecimalType(38,16), true) as decimal(38,15))) + promote_precision(cast(ws_ext_sales_price#2519 as decimal(38,15)))), DecimalType(38,15), true)) / 2.000000000000000), DecimalType(38,15), true))]
Aggregate Attributes [2]: [sum#3259, isEmpty#3260]
Results [10]: [c_customer_id#2479, c_first_name#2486, c_last_name#2487, c_preferred_cust_flag#2488, c_birth_country#2492, c_login#2493, c_email_address#2494, d_year#2536, sum#3261, isEmpty#3262]

(120) Exchange
Input [10]: [c_customer_id#2479, c_first_name#2486, c_last_name#2487, c_preferred_cust_flag#2488, c_birth_country#2492, c_login#2493, c_email_address#2494, d_year#2536, sum#3261, isEmpty#3262]
Arguments: hashpartitioning(c_customer_id#2479, c_first_name#2486, c_last_name#2487, c_preferred_cust_flag#2488, c_birth_country#2492, c_login#2493, c_email_address#2494, d_year#2536, 5), ENSURE_REQUIREMENTS, [id=#1612]

(121) HashAggregate [codegen id : 57]
Input [10]: [c_customer_id#2479, c_first_name#2486, c_last_name#2487, c_preferred_cust_flag#2488, c_birth_country#2492, c_login#2493, c_email_address#2494, d_year#2536, sum#3261, isEmpty#3262]
Keys [8]: [c_customer_id#2479, c_first_name#2486, c_last_name#2487, c_preferred_cust_flag#2488, c_birth_country#2492, c_login#2493, c_email_address#2494, d_year#2536]
Functions [1]: [sum(CheckOverflow((promote_precision(CheckOverflow((promote_precision(cast(CheckOverflow((promote_precision(cast(CheckOverflow((promote_precision(cast(ws_ext_list_price#2521 as decimal(38,17))) - promote_precision(cast(ws_ext_wholesale_cost#2520 as decimal(38,17)))), DecimalType(38,17), true) as decimal(38,16))) - promote_precision(cast(ws_ext_discount_amt#2518 as decimal(38,16)))), DecimalType(38,16), true) as decimal(38,15))) + promote_precision(cast(ws_ext_sales_price#2519 as decimal(38,15)))), DecimalType(38,15), true)) / 2.000000000000000), DecimalType(38,15), true))]
Aggregate Attributes [1]: [sum(CheckOverflow((promote_precision(CheckOverflow((promote_precision(cast(CheckOverflow((promote_precision(cast(CheckOverflow((promote_precision(cast(ws_ext_list_price#2521 as decimal(38,17))) - promote_precision(cast(ws_ext_wholesale_cost#2520 as decimal(38,17)))), DecimalType(38,17), true) as decimal(38,16))) - promote_precision(cast(ws_ext_discount_amt#2518 as decimal(38,16)))), DecimalType(38,16), true) as decimal(38,15))) + promote_precision(cast(ws_ext_sales_price#2519 as decimal(38,15)))), DecimalType(38,15), true)) / 2.000000000000000), DecimalType(38,15), true))#2801]
Results [2]: [c_customer_id#2479 AS customer_id#1403, sum(CheckOverflow((promote_precision(CheckOverflow((promote_precision(cast(CheckOverflow((promote_precision(cast(CheckOverflow((promote_precision(cast(ws_ext_list_price#2521 as decimal(38,17))) - promote_precision(cast(ws_ext_wholesale_cost#2520 as decimal(38,17)))), DecimalType(38,17), true) as decimal(38,16))) - promote_precision(cast(ws_ext_discount_amt#2518 as decimal(38,16)))), DecimalType(38,16), true) as decimal(38,15))) + promote_precision(cast(ws_ext_sales_price#2519 as decimal(38,15)))), DecimalType(38,15), true)) / 2.000000000000000), DecimalType(38,15), true))#2801 AS year_total#1411]

(122) Filter [codegen id : 57]
Input [2]: [customer_id#1403, year_total#1411]
Condition : (isnotnull(year_total#1411) AND (year_total#1411 > 0E-15))

(123) Project [codegen id : 57]
Output [2]: [customer_id#1403 AS customer_id#2835, year_total#1411 AS year_total#2843]
Input [2]: [customer_id#1403, year_total#1411]

(124) Exchange
Input [2]: [customer_id#2835, year_total#2843]
Arguments: hashpartitioning(customer_id#2835, 5), ENSURE_REQUIREMENTS, [id=#1618]

(125) Sort [codegen id : 58]
Input [2]: [customer_id#2835, year_total#2843]
Arguments: [customer_id#2835 ASC NULLS FIRST], false, 0

(126) SortMergeJoin [codegen id : 59]
Left keys [1]: [customer_id#1383]
Right keys [1]: [customer_id#2835]
Join condition: None

(127) Project [codegen id : 59]
Output [8]: [customer_id#1383, customer_id#2805, customer_first_name#2806, customer_last_name#2807, customer_preferred_cust_flag#2808, year_total#2823, year_total#2833, year_total#2843]
Input [9]: [customer_id#1383, customer_id#2805, customer_first_name#2806, customer_last_name#2807, customer_preferred_cust_flag#2808, year_total#2823, year_total#2833, customer_id#2835, year_total#2843]

(128) BatchScan
Output [8]: [C_CUSTOMER_SK#2707, C_CUSTOMER_ID#2708, C_FIRST_NAME#2715, C_LAST_NAME#2716, C_PREFERRED_CUST_FLAG#2717, C_BIRTH_COUNTRY#2721, C_LOGIN#2722, C_EMAIL_ADDRESS#2723]
Format: orafile
OraPlan: 00 OraTableScan TPCDS.CUSTOMER, [C_CUSTOMER_SK#3211, C_CUSTOMER_ID#3212, C_FIRST_NAME#3213, C_LAST_NAME#3214, C_PREFERRED_CUST_FLAG#3215, C_BIRTH_COUNTRY#3216, C_LOGIN#3217, C_EMAIL_ADDRESS#3218], [oracolumnref(C_CUSTOMER_SK#3211), oracolumnref(C_CUSTOMER_ID#3212), oracolumnref(C_FIRST_NAME#3213), oracolumnref(C_LAST_NAME#3214), oracolumnref(C_PREFERRED_CUST_FLAG#3215), oracolumnref(C_BIRTH_COUNTRY#3216), oracolumnref(C_LOGIN#3217), oracolumnref(C_EMAIL_ADDRESS#3218)]
PartitionSchema: struct<>
ReadSchema: struct<C_CUSTOMER_SK:decimal(38,18),C_CUSTOMER_ID:string,C_FIRST_NAME:string,C_LAST_NAME:string,C_PREFERRED_CUST_FLAG:string,C_BIRTH_COUNTRY:string,C_LOGIN:string,C_EMAIL_ADDRESS:string>
dsKey: DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
oraPushdownSQL: select "C_CUSTOMER_SK", "C_CUSTOMER_ID", "C_FIRST_NAME", "C_LAST_NAME", "C_PREFERRED_CUST_FLAG", "C_BIRTH_COUNTRY", "C_LOGIN", "C_EMAIL_ADDRESS"
from TPCDS.CUSTOMER

(129) Project [codegen id : 60]
Output [8]: [C_CUSTOMER_SK#2707, C_CUSTOMER_ID#2708, C_FIRST_NAME#2715, C_LAST_NAME#2716, C_PREFERRED_CUST_FLAG#2717, C_BIRTH_COUNTRY#2721, C_LOGIN#2722, C_EMAIL_ADDRESS#2723]
Input [8]: [C_CUSTOMER_SK#2707, C_CUSTOMER_ID#2708, C_FIRST_NAME#2715, C_LAST_NAME#2716, C_PREFERRED_CUST_FLAG#2717, C_BIRTH_COUNTRY#2721, C_LOGIN#2722, C_EMAIL_ADDRESS#2723]

(130) Exchange
Input [8]: [C_CUSTOMER_SK#2707, C_CUSTOMER_ID#2708, C_FIRST_NAME#2715, C_LAST_NAME#2716, C_PREFERRED_CUST_FLAG#2717, C_BIRTH_COUNTRY#2721, C_LOGIN#2722, C_EMAIL_ADDRESS#2723]
Arguments: hashpartitioning(c_customer_sk#2707, 5), ENSURE_REQUIREMENTS, [id=#1630]

(131) Sort [codegen id : 61]
Input [8]: [C_CUSTOMER_SK#2707, C_CUSTOMER_ID#2708, C_FIRST_NAME#2715, C_LAST_NAME#2716, C_PREFERRED_CUST_FLAG#2717, C_BIRTH_COUNTRY#2721, C_LOGIN#2722, C_EMAIL_ADDRESS#2723]
Arguments: [c_customer_sk#2707 ASC NULLS FIRST], false, 0

(132) BatchScan
Output [6]: [WS_BILL_CUSTOMER_SK#2729, WS_EXT_DISCOUNT_AMT#2747, WS_EXT_SALES_PRICE#2748, WS_EXT_WHOLESALE_COST#2749, WS_EXT_LIST_PRICE#2750, WS_SOLD_DATE_SK#2725]
Format: orafile
OraPlan: 00 OraTableScan TPCDS.WEB_SALES, [WS_BILL_CUSTOMER_SK#3227, WS_EXT_DISCOUNT_AMT#3228, WS_EXT_SALES_PRICE#3229, WS_EXT_WHOLESALE_COST#3230, WS_EXT_LIST_PRICE#3231, WS_SOLD_DATE_SK#3232], [oracolumnref(WS_BILL_CUSTOMER_SK#3227), oracolumnref(WS_EXT_DISCOUNT_AMT#3228), oracolumnref(WS_EXT_SALES_PRICE#3229), oracolumnref(WS_EXT_WHOLESALE_COST#3230), oracolumnref(WS_EXT_LIST_PRICE#3231), oracolumnref(WS_SOLD_DATE_SK#3232)], orapostfixunaryopexpression(isnotnull(WS_BILL_CUSTOMER_SK#2729))
PartitionSchema: struct<WS_SOLD_DATE_SK:decimal(38,18)>
ReadSchema: struct<WS_BILL_CUSTOMER_SK:decimal(38,18),WS_EXT_DISCOUNT_AMT:decimal(38,18),WS_EXT_SALES_PRICE:decimal(38,18),WS_EXT_WHOLESALE_COST:decimal(38,18),WS_EXT_LIST_PRICE:decimal(38,18)>
dsKey: DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
oraPushdownSQL: select "WS_BILL_CUSTOMER_SK", "WS_EXT_DISCOUNT_AMT", "WS_EXT_SALES_PRICE", "WS_EXT_WHOLESALE_COST", "WS_EXT_LIST_PRICE", "WS_SOLD_DATE_SK"
from TPCDS.WEB_SALES
where "WS_BILL_CUSTOMER_SK" IS NOT NULL and "WS_SOLD_DATE_SK" IS NOT NULL

(133) Filter [codegen id : 62]
Input [6]: [WS_BILL_CUSTOMER_SK#2729, WS_EXT_DISCOUNT_AMT#2747, WS_EXT_SALES_PRICE#2748, WS_EXT_WHOLESALE_COST#2749, WS_EXT_LIST_PRICE#2750, WS_SOLD_DATE_SK#2725]
Condition : isnotnull(WS_BILL_CUSTOMER_SK#2729)

(134) Exchange
Input [6]: [WS_BILL_CUSTOMER_SK#2729, WS_EXT_DISCOUNT_AMT#2747, WS_EXT_SALES_PRICE#2748, WS_EXT_WHOLESALE_COST#2749, WS_EXT_LIST_PRICE#2750, WS_SOLD_DATE_SK#2725]
Arguments: hashpartitioning(ws_bill_customer_sk#2729, 5), ENSURE_REQUIREMENTS, [id=#1638]

(135) Sort [codegen id : 63]
Input [6]: [WS_BILL_CUSTOMER_SK#2729, WS_EXT_DISCOUNT_AMT#2747, WS_EXT_SALES_PRICE#2748, WS_EXT_WHOLESALE_COST#2749, WS_EXT_LIST_PRICE#2750, WS_SOLD_DATE_SK#2725]
Arguments: [ws_bill_customer_sk#2729 ASC NULLS FIRST], false, 0

(136) SortMergeJoin [codegen id : 64]
Left keys [1]: [c_customer_sk#2707]
Right keys [1]: [ws_bill_customer_sk#2729]
Join condition: None

(137) Project [codegen id : 64]
Output [12]: [C_CUSTOMER_ID#2708, C_FIRST_NAME#2715, C_LAST_NAME#2716, C_PREFERRED_CUST_FLAG#2717, C_BIRTH_COUNTRY#2721, C_LOGIN#2722, C_EMAIL_ADDRESS#2723, WS_SOLD_DATE_SK#2725, WS_EXT_DISCOUNT_AMT#2747, WS_EXT_SALES_PRICE#2748, WS_EXT_WHOLESALE_COST#2749, WS_EXT_LIST_PRICE#2750]
Input [14]: [C_CUSTOMER_SK#2707, C_CUSTOMER_ID#2708, C_FIRST_NAME#2715, C_LAST_NAME#2716, C_PREFERRED_CUST_FLAG#2717, C_BIRTH_COUNTRY#2721, C_LOGIN#2722, C_EMAIL_ADDRESS#2723, WS_BILL_CUSTOMER_SK#2729, WS_EXT_DISCOUNT_AMT#2747, WS_EXT_SALES_PRICE#2748, WS_EXT_WHOLESALE_COST#2749, WS_EXT_LIST_PRICE#2750, WS_SOLD_DATE_SK#2725]

(138) Exchange
Input [12]: [C_CUSTOMER_ID#2708, C_FIRST_NAME#2715, C_LAST_NAME#2716, C_PREFERRED_CUST_FLAG#2717, C_BIRTH_COUNTRY#2721, C_LOGIN#2722, C_EMAIL_ADDRESS#2723, WS_SOLD_DATE_SK#2725, WS_EXT_DISCOUNT_AMT#2747, WS_EXT_SALES_PRICE#2748, WS_EXT_WHOLESALE_COST#2749, WS_EXT_LIST_PRICE#2750]
Arguments: hashpartitioning(ws_sold_date_sk#2725, 5), ENSURE_REQUIREMENTS, [id=#1646]

(139) Sort [codegen id : 65]
Input [12]: [C_CUSTOMER_ID#2708, C_FIRST_NAME#2715, C_LAST_NAME#2716, C_PREFERRED_CUST_FLAG#2717, C_BIRTH_COUNTRY#2721, C_LOGIN#2722, C_EMAIL_ADDRESS#2723, WS_SOLD_DATE_SK#2725, WS_EXT_DISCOUNT_AMT#2747, WS_EXT_SALES_PRICE#2748, WS_EXT_WHOLESALE_COST#2749, WS_EXT_LIST_PRICE#2750]
Arguments: [ws_sold_date_sk#2725 ASC NULLS FIRST], false, 0

(140) BatchScan
Output [2]: [D_DATE_SK#2759, D_YEAR#2765]
Format: orafile
OraPlan: 00 OraTableScan TPCDS.DATE_DIM, [D_DATE_SK#3239, D_YEAR#3240], [oracolumnref(D_DATE_SK#3239), oracolumnref(D_YEAR#3240)], orabinaryopexpression((isnotnull(D_YEAR#2765) AND (D_YEAR#2765 = 2002.000000000000000000)))
PartitionSchema: struct<>
ReadSchema: struct<D_DATE_SK:decimal(38,18),D_YEAR:decimal(38,18)>
dsKey: DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
oraPushdownBindValues: 2002.000000000000000000
oraPushdownSQL: select "D_DATE_SK", "D_YEAR"
from TPCDS.DATE_DIM
where ("D_YEAR" IS NOT NULL AND ("D_YEAR" = ?))

(141) Filter [codegen id : 66]
Input [2]: [D_DATE_SK#2759, D_YEAR#2765]
Condition : (isnotnull(D_YEAR#2765) AND (D_YEAR#2765 = 2002.000000000000000000))

(142) Exchange
Input [2]: [D_DATE_SK#2759, D_YEAR#2765]
Arguments: hashpartitioning(d_date_sk#2759, 5), ENSURE_REQUIREMENTS, [id=#1654]

(143) Sort [codegen id : 67]
Input [2]: [D_DATE_SK#2759, D_YEAR#2765]
Arguments: [d_date_sk#2759 ASC NULLS FIRST], false, 0

(144) SortMergeJoin [codegen id : 68]
Left keys [1]: [ws_sold_date_sk#2725]
Right keys [1]: [d_date_sk#2759]
Join condition: None

(145) Project [codegen id : 68]
Output [12]: [C_CUSTOMER_ID#2708, C_FIRST_NAME#2715, C_LAST_NAME#2716, C_PREFERRED_CUST_FLAG#2717, C_BIRTH_COUNTRY#2721, C_LOGIN#2722, C_EMAIL_ADDRESS#2723, WS_EXT_DISCOUNT_AMT#2747, WS_EXT_SALES_PRICE#2748, WS_EXT_WHOLESALE_COST#2749, WS_EXT_LIST_PRICE#2750, D_YEAR#2765]
Input [14]: [C_CUSTOMER_ID#2708, C_FIRST_NAME#2715, C_LAST_NAME#2716, C_PREFERRED_CUST_FLAG#2717, C_BIRTH_COUNTRY#2721, C_LOGIN#2722, C_EMAIL_ADDRESS#2723, WS_SOLD_DATE_SK#2725, WS_EXT_DISCOUNT_AMT#2747, WS_EXT_SALES_PRICE#2748, WS_EXT_WHOLESALE_COST#2749, WS_EXT_LIST_PRICE#2750, D_DATE_SK#2759, D_YEAR#2765]

(146) HashAggregate [codegen id : 68]
Input [12]: [C_CUSTOMER_ID#2708, C_FIRST_NAME#2715, C_LAST_NAME#2716, C_PREFERRED_CUST_FLAG#2717, C_BIRTH_COUNTRY#2721, C_LOGIN#2722, C_EMAIL_ADDRESS#2723, WS_EXT_DISCOUNT_AMT#2747, WS_EXT_SALES_PRICE#2748, WS_EXT_WHOLESALE_COST#2749, WS_EXT_LIST_PRICE#2750, D_YEAR#2765]
Keys [8]: [c_customer_id#2708, c_first_name#2715, c_last_name#2716, c_preferred_cust_flag#2717, c_birth_country#2721, c_login#2722, c_email_address#2723, d_year#2765]
Functions [1]: [partial_sum(CheckOverflow((promote_precision(CheckOverflow((promote_precision(cast(CheckOverflow((promote_precision(cast(CheckOverflow((promote_precision(cast(ws_ext_list_price#2750 as decimal(38,17))) - promote_precision(cast(ws_ext_wholesale_cost#2749 as decimal(38,17)))), DecimalType(38,17), true) as decimal(38,16))) - promote_precision(cast(ws_ext_discount_amt#2747 as decimal(38,16)))), DecimalType(38,16), true) as decimal(38,15))) + promote_precision(cast(ws_ext_sales_price#2748 as decimal(38,15)))), DecimalType(38,15), true)) / 2.000000000000000), DecimalType(38,15), true))]
Aggregate Attributes [2]: [sum#3263, isEmpty#3264]
Results [10]: [c_customer_id#2708, c_first_name#2715, c_last_name#2716, c_preferred_cust_flag#2717, c_birth_country#2721, c_login#2722, c_email_address#2723, d_year#2765, sum#3265, isEmpty#3266]

(147) Exchange
Input [10]: [c_customer_id#2708, c_first_name#2715, c_last_name#2716, c_preferred_cust_flag#2717, c_birth_country#2721, c_login#2722, c_email_address#2723, d_year#2765, sum#3265, isEmpty#3266]
Arguments: hashpartitioning(c_customer_id#2708, c_first_name#2715, c_last_name#2716, c_preferred_cust_flag#2717, c_birth_country#2721, c_login#2722, c_email_address#2723, d_year#2765, 5), ENSURE_REQUIREMENTS, [id=#1663]

(148) HashAggregate [codegen id : 69]
Input [10]: [c_customer_id#2708, c_first_name#2715, c_last_name#2716, c_preferred_cust_flag#2717, c_birth_country#2721, c_login#2722, c_email_address#2723, d_year#2765, sum#3265, isEmpty#3266]
Keys [8]: [c_customer_id#2708, c_first_name#2715, c_last_name#2716, c_preferred_cust_flag#2717, c_birth_country#2721, c_login#2722, c_email_address#2723, d_year#2765]
Functions [1]: [sum(CheckOverflow((promote_precision(CheckOverflow((promote_precision(cast(CheckOverflow((promote_precision(cast(CheckOverflow((promote_precision(cast(ws_ext_list_price#2750 as decimal(38,17))) - promote_precision(cast(ws_ext_wholesale_cost#2749 as decimal(38,17)))), DecimalType(38,17), true) as decimal(38,16))) - promote_precision(cast(ws_ext_discount_amt#2747 as decimal(38,16)))), DecimalType(38,16), true) as decimal(38,15))) + promote_precision(cast(ws_ext_sales_price#2748 as decimal(38,15)))), DecimalType(38,15), true)) / 2.000000000000000), DecimalType(38,15), true))]
Aggregate Attributes [1]: [sum(CheckOverflow((promote_precision(CheckOverflow((promote_precision(cast(CheckOverflow((promote_precision(cast(CheckOverflow((promote_precision(cast(ws_ext_list_price#2750 as decimal(38,17))) - promote_precision(cast(ws_ext_wholesale_cost#2749 as decimal(38,17)))), DecimalType(38,17), true) as decimal(38,16))) - promote_precision(cast(ws_ext_discount_amt#2747 as decimal(38,16)))), DecimalType(38,16), true) as decimal(38,15))) + promote_precision(cast(ws_ext_sales_price#2748 as decimal(38,15)))), DecimalType(38,15), true)) / 2.000000000000000), DecimalType(38,15), true))#2804]
Results [2]: [c_customer_id#2708 AS customer_id#2845, sum(CheckOverflow((promote_precision(CheckOverflow((promote_precision(cast(CheckOverflow((promote_precision(cast(CheckOverflow((promote_precision(cast(ws_ext_list_price#2750 as decimal(38,17))) - promote_precision(cast(ws_ext_wholesale_cost#2749 as decimal(38,17)))), DecimalType(38,17), true) as decimal(38,16))) - promote_precision(cast(ws_ext_discount_amt#2747 as decimal(38,16)))), DecimalType(38,16), true) as decimal(38,15))) + promote_precision(cast(ws_ext_sales_price#2748 as decimal(38,15)))), DecimalType(38,15), true)) / 2.000000000000000), DecimalType(38,15), true))#2804 AS year_total#2853]

(149) Exchange
Input [2]: [customer_id#2845, year_total#2853]
Arguments: hashpartitioning(customer_id#2845, 5), ENSURE_REQUIREMENTS, [id=#1667]

(150) Sort [codegen id : 70]
Input [2]: [customer_id#2845, year_total#2853]
Arguments: [customer_id#2845 ASC NULLS FIRST], false, 0

(151) SortMergeJoin [codegen id : 71]
Left keys [1]: [customer_id#1383]
Right keys [1]: [customer_id#2845]
Join condition: (CASE WHEN (year_total#2823 > 0E-15) THEN CheckOverflow((promote_precision(year_total#2833) / promote_precision(year_total#2823)), DecimalType(38,6), true) ELSE null END > CASE WHEN (year_total#2843 > 0E-15) THEN CheckOverflow((promote_precision(year_total#2853) / promote_precision(year_total#2843)), DecimalType(38,6), true) ELSE null END)

(152) Project [codegen id : 71]
Output [4]: [customer_id#2805, customer_first_name#2806, customer_last_name#2807, customer_preferred_cust_flag#2808]
Input [10]: [customer_id#1383, customer_id#2805, customer_first_name#2806, customer_last_name#2807, customer_preferred_cust_flag#2808, year_total#2823, year_total#2833, year_total#2843, customer_id#2845, year_total#2853]

(153) TakeOrderedAndProject
Input [4]: [customer_id#2805, customer_first_name#2806, customer_last_name#2807, customer_preferred_cust_flag#2808]
Arguments: 100, [customer_id#2805 ASC NULLS FIRST, customer_first_name#2806 ASC NULLS FIRST, customer_last_name#2807 ASC NULLS FIRST, customer_preferred_cust_flag#2808 ASC NULLS FIRST], [customer_id#2805, customer_first_name#2806, customer_last_name#2807, customer_preferred_cust_flag#2808]


Query q5

Spark SQL

with ssr as
 (select s_store_id,
        sum(sales_price) as sales,
        sum(profit) as profit,
        sum(return_amt) as returns,
        sum(net_loss) as profit_loss
 from
  ( select  ss_store_sk as store_sk,
            ss_sold_date_sk  as date_sk,
            ss_ext_sales_price as sales_price,
            ss_net_profit as profit,
            cast(0 as decimal(7,2)) as return_amt,
            cast(0 as decimal(7,2)) as net_loss
    from store_sales
    union all
    select sr_store_sk as store_sk,
           sr_returned_date_sk as date_sk,
           cast(0 as decimal(7,2)) as sales_price,
           cast(0 as decimal(7,2)) as profit,
           sr_return_amt as return_amt,
           sr_net_loss as net_loss
    from store_returns
   ) salesreturns,
     date_dim,
     store
 where date_sk = d_date_sk
       and d_date between cast('2000-08-23' as date)
                  and date_add(cast('2000-08-23' as date), 14 )
       and store_sk = s_store_sk
 group by s_store_id)
 ,
 csr as
 (select cp_catalog_page_id,
        sum(sales_price) as sales,
        sum(profit) as profit,
        sum(return_amt) as returns,
        sum(net_loss) as profit_loss
 from
  ( select  cs_catalog_page_sk as page_sk,
            cs_sold_date_sk  as date_sk,
            cs_ext_sales_price as sales_price,
            cs_net_profit as profit,
            cast(0 as decimal(7,2)) as return_amt,
            cast(0 as decimal(7,2)) as net_loss
    from catalog_sales
    union all
    select cr_catalog_page_sk as page_sk,
           cr_returned_date_sk as date_sk,
           cast(0 as decimal(7,2)) as sales_price,
           cast(0 as decimal(7,2)) as profit,
           cr_return_amount as return_amt,
           cr_net_loss as net_loss
    from catalog_returns
   ) salesreturns,
     date_dim,
     catalog_page
 where date_sk = d_date_sk
       and d_date between cast('2000-08-23' as date)
                  and date_add(cast('2000-08-23' as date), 14 )
       and page_sk = cp_catalog_page_sk
 group by cp_catalog_page_id)
 ,
 wsr as
 (select web_site_id,
        sum(sales_price) as sales,
        sum(profit) as profit,
        sum(return_amt) as returns,
        sum(net_loss) as profit_loss
 from
  ( select  ws_web_site_sk as wsr_web_site_sk,
            ws_sold_date_sk  as date_sk,
            ws_ext_sales_price as sales_price,
            ws_net_profit as profit,
            cast(0 as decimal(7,2)) as return_amt,
            cast(0 as decimal(7,2)) as net_loss
    from web_sales
    union all
    select ws_web_site_sk as wsr_web_site_sk,
           wr_returned_date_sk as date_sk,
           cast(0 as decimal(7,2)) as sales_price,
           cast(0 as decimal(7,2)) as profit,
           wr_return_amt as return_amt,
           wr_net_loss as net_loss
    from web_returns left outer join web_sales on
         ( wr_item_sk = ws_item_sk
           and wr_order_number = ws_order_number)
   ) salesreturns,
     date_dim,
     web_site
 where date_sk = d_date_sk
       and d_date between cast('2000-08-23' as date)
                  and date_add(cast('2000-08-23' as date), 14 )
       and wsr_web_site_sk = web_site_sk
 group by web_site_id)
  select  channel
        , id
        , sum(sales) as sales
        , sum(returns) as returns
        , sum(profit) as profit
 from
 (select 'store channel' as channel
        , concat('store', s_store_id) as id
        , sales
        , returns
        , (profit - profit_loss) as profit
 from   ssr
 union all
 select 'catalog channel' as channel
        , concat('catalog_page', cp_catalog_page_id) as id
        , sales
        , returns
        , (profit - profit_loss) as profit
 from  csr
 union all
 select 'web channel' as channel
        , concat('web_site', web_site_id) as id
        , sales
        , returns
        , (profit - profit_loss) as profit
 from   wsr
 ) x
 group by rollup (channel, id)
 order by channel
         ,id
  limit 100;
 

Spark Plan with Pushdown turned on

Project (1)
+- BatchScan (2)

(2) BatchScan
Oracle Instance:
   DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
Pushdown Oracle SQL:
select "channel_7_sparkora", "id_9_sparkora", "sales", "returns", "profit"
from ( select "channel_7_sparkora", "id_9_sparkora", SUM("sales") AS "sales", SUM("returns") AS "returns", SUM("profit") AS "profit"
from ( select SUM("sales_price") AS "sales", SUM("return_amt") AS "returns", (cast(SUM("profit") as NUMBER(38, 17)) - cast(SUM("net_loss") as NUMBER(38, 17))) AS "profit", 'store channel' AS "channel", CONCAT('store' , "S_STORE_ID") AS "id"
from ( select "SS_STORE_SK" AS "store_sk", "SS_SOLD_DATE_SK" AS "date_sk", "SS_EXT_SALES_PRICE" AS "sales_price", "SS_NET_PROFIT" AS "profit", 0E-18 AS "return_amt", 0E-18 AS "net_loss"
from TPCDS.STORE_SALES 
where ("SS_STORE_SK" IS NOT NULL AND "SS_SOLD_DATE_SK" IS NOT NULL) UNION ALL select "SR_STORE_SK" AS "store_sk", "SR_RETURNED_DATE_SK" AS "date_sk", 0E-18 AS "sales_price", 0E-18 AS "profit", "SR_RETURN_AMT" AS "return_amt", "SR_NET_LOSS" AS "net_loss"
from TPCDS.STORE_RETURNS 
where ("SR_STORE_SK" IS NOT NULL AND "SR_RETURNED_DATE_SK" IS NOT NULL) )  join TPCDS.DATE_DIM  on ("date_sk" = "D_DATE_SK") join TPCDS.STORE  on ("store_sk" = "S_STORE_SK")
where (("D_DATE" IS NOT NULL AND ("D_DATE" >= TRUNC(TIMESTAMP '2000-08-23 07:00:00.000000'))) AND ("D_DATE" <= TRUNC(TIMESTAMP '2000-09-06 07:00:00.000000')))
group by "S_STORE_ID" UNION ALL select SUM("sales_price") AS "sales", SUM("return_amt") AS "returns", (cast(SUM("profit") as NUMBER(38, 17)) - cast(SUM("net_loss") as NUMBER(38, 17))) AS "profit", 'catalog channel' AS "channel", CONCAT('catalog_page' , "CP_CATALOG_PAGE_ID") AS "id"
from ( select "CS_CATALOG_PAGE_SK" AS "page_sk", "CS_SOLD_DATE_SK" AS "date_sk", "CS_EXT_SALES_PRICE" AS "sales_price", "CS_NET_PROFIT" AS "profit", 0E-18 AS "return_amt", 0E-18 AS "net_loss"
from TPCDS.CATALOG_SALES 
where ("CS_CATALOG_PAGE_SK" IS NOT NULL AND "CS_SOLD_DATE_SK" IS NOT NULL) UNION ALL select "CR_CATALOG_PAGE_SK" AS "page_sk", "CR_RETURNED_DATE_SK" AS "date_sk", 0E-18 AS "sales_price", 0E-18 AS "profit", "CR_RETURN_AMOUNT" AS "return_amt", "CR_NET_LOSS" AS "net_loss"
from TPCDS.CATALOG_RETURNS 
where ("CR_CATALOG_PAGE_SK" IS NOT NULL AND "CR_RETURNED_DATE_SK" IS NOT NULL) )  join TPCDS.DATE_DIM  on ("date_sk" = "D_DATE_SK") join TPCDS.CATALOG_PAGE  on ("page_sk" = "CP_CATALOG_PAGE_SK")
where (("D_DATE" IS NOT NULL AND ("D_DATE" >= TRUNC(TIMESTAMP '2000-08-23 07:00:00.000000'))) AND ("D_DATE" <= TRUNC(TIMESTAMP '2000-09-06 07:00:00.000000')))
group by "CP_CATALOG_PAGE_ID" UNION ALL select SUM("sales_price") AS "sales", SUM("return_amt") AS "returns", (cast(SUM("profit") as NUMBER(38, 17)) - cast(SUM("net_loss") as NUMBER(38, 17))) AS "profit", 'web channel' AS "channel", CONCAT('web_site' , "WEB_SITE_ID") AS "id"
from ( select "WS_WEB_SITE_SK" AS "wsr_web_site_sk", "WS_SOLD_DATE_SK" AS "date_sk", "WS_EXT_SALES_PRICE" AS "sales_price", "WS_NET_PROFIT" AS "profit", 0E-18 AS "return_amt", 0E-18 AS "net_loss"
from TPCDS.WEB_SALES 
where ("WS_WEB_SITE_SK" IS NOT NULL AND "WS_SOLD_DATE_SK" IS NOT NULL) UNION ALL select "WS_WEB_SITE_SK" AS "wsr_web_site_sk", "WR_RETURNED_DATE_SK" AS "date_sk", 0E-18 AS "sales_price", 0E-18 AS "profit", "WR_RETURN_AMT" AS "return_amt", "WR_NET_LOSS" AS "net_loss"
from TPCDS.WEB_RETURNS  join TPCDS.WEB_SALES  on (("WR_ITEM_SK" = "WS_ITEM_SK") AND ("WR_ORDER_NUMBER" = "WS_ORDER_NUMBER"))
where ("WR_RETURNED_DATE_SK" IS NOT NULL AND "WS_WEB_SITE_SK" IS NOT NULL) )  join TPCDS.DATE_DIM  on ("date_sk" = "D_DATE_SK") join TPCDS.WEB_SITE  on ("wsr_web_site_sk" = "WEB_SITE_SK")
where (("D_DATE" IS NOT NULL AND ("D_DATE" >= TRUNC(TIMESTAMP '2000-08-23 07:00:00.000000'))) AND ("D_DATE" <= TRUNC(TIMESTAMP '2000-09-06 07:00:00.000000')))
group by "WEB_SITE_ID" )   , lateral ( select "channel" "channel_7_sparkora", "id" "id_9_sparkora", 0 "spark_grouping_id_5_sparkora" from dual union all select "channel", null, 1 from dual union all select null, null, 3 from dual )
group by "channel_7_sparkora", "id_9_sparkora", "spark_grouping_id_5_sparkora"
order by "channel_7_sparkora" ASC NULLS FIRST, "id_9_sparkora" ASC NULLS FIRST ) 
where rownum <= 100
Pushdown Oracle SQL, oracle plan stats estimates:
rowCount = 100, bytes=6400
Pushdown Oracle SQL, Query Splitting details:
Query is not split

Spark Plan with Pushdown turned off

== Physical Plan ==
TakeOrderedAndProject (94)
+- * HashAggregate (93)
   +- Exchange (92)
      +- * HashAggregate (91)
         +- * Expand (90)
            +- Union (89)
               :- * HashAggregate (27)
               :  +- Exchange (26)
               :     +- * HashAggregate (25)
               :        +- * Project (24)
               :           +- * SortMergeJoin Inner (23)
               :              :- * Sort (18)
               :              :  +- Exchange (17)
               :              :     +- * Project (16)
               :              :        +- * SortMergeJoin Inner (15)
               :              :           :- * Sort (9)
               :              :           :  +- Exchange (8)
               :              :           :     +- Union (7)
               :              :           :        :- * Project (3)
               :              :           :        :  +- * Filter (2)
               :              :           :        :     +- BatchScan (1)
               :              :           :        +- * Project (6)
               :              :           :           +- * Filter (5)
               :              :           :              +- BatchScan (4)
               :              :           +- * Sort (14)
               :              :              +- Exchange (13)
               :              :                 +- * Project (12)
               :              :                    +- * Filter (11)
               :              :                       +- BatchScan (10)
               :              +- * Sort (22)
               :                 +- Exchange (21)
               :                    +- * Project (20)
               :                       +- BatchScan (19)
               :- * HashAggregate (54)
               :  +- Exchange (53)
               :     +- * HashAggregate (52)
               :        +- * Project (51)
               :           +- * SortMergeJoin Inner (50)
               :              :- * Sort (45)
               :              :  +- Exchange (44)
               :              :     +- * Project (43)
               :              :        +- * SortMergeJoin Inner (42)
               :              :           :- * Sort (36)
               :              :           :  +- Exchange (35)
               :              :           :     +- Union (34)
               :              :           :        :- * Project (30)
               :              :           :        :  +- * Filter (29)
               :              :           :        :     +- BatchScan (28)
               :              :           :        +- * Project (33)
               :              :           :           +- * Filter (32)
               :              :           :              +- BatchScan (31)
               :              :           +- * Sort (41)
               :              :              +- Exchange (40)
               :              :                 +- * Project (39)
               :              :                    +- * Filter (38)
               :              :                       +- BatchScan (37)
               :              +- * Sort (49)
               :                 +- Exchange (48)
               :                    +- * Project (47)
               :                       +- BatchScan (46)
               +- * HashAggregate (88)
                  +- Exchange (87)
                     +- * HashAggregate (86)
                        +- * Project (85)
                           +- * SortMergeJoin Inner (84)
                              :- * Sort (79)
                              :  +- Exchange (78)
                              :     +- * Project (77)
                              :        +- * SortMergeJoin Inner (76)
                              :           :- * Sort (70)
                              :           :  +- Exchange (69)
                              :           :     +- Union (68)
                              :           :        :- * Project (57)
                              :           :        :  +- * Filter (56)
                              :           :        :     +- BatchScan (55)
                              :           :        +- * Project (67)
                              :           :           +- * SortMergeJoin Inner (66)
                              :           :              :- * Sort (61)
                              :           :              :  +- Exchange (60)
                              :           :              :     +- * Project (59)
                              :           :              :        +- BatchScan (58)
                              :           :              +- * Sort (65)
                              :           :                 +- Exchange (64)
                              :           :                    +- * Filter (63)
                              :           :                       +- BatchScan (62)
                              :           +- * Sort (75)
                              :              +- Exchange (74)
                              :                 +- * Project (73)
                              :                    +- * Filter (72)
                              :                       +- BatchScan (71)
                              +- * Sort (83)
                                 +- Exchange (82)
                                    +- * Project (81)
                                       +- BatchScan (80)


(1) BatchScan
Output [4]: [SS_STORE_SK#5229, SS_EXT_SALES_PRICE#5237, SS_NET_PROFIT#5244, SS_SOLD_DATE_SK#5222]
Format: orafile
OraPlan: 00 OraTableScan TPCDS.STORE_SALES, [SS_STORE_SK#5609, SS_EXT_SALES_PRICE#5610, SS_NET_PROFIT#5611, SS_SOLD_DATE_SK#5612], [oracolumnref(SS_STORE_SK#5609), oracolumnref(SS_EXT_SALES_PRICE#5610), oracolumnref(SS_NET_PROFIT#5611), oracolumnref(SS_SOLD_DATE_SK#5612)], orapostfixunaryopexpression(isnotnull(SS_STORE_SK#5229))
PartitionSchema: struct<SS_SOLD_DATE_SK:decimal(38,18)>
ReadSchema: struct<SS_STORE_SK:decimal(38,18),SS_EXT_SALES_PRICE:decimal(38,18),SS_NET_PROFIT:decimal(38,18)>
dsKey: DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
oraPushdownSQL: select "SS_STORE_SK", "SS_EXT_SALES_PRICE", "SS_NET_PROFIT", "SS_SOLD_DATE_SK"
from TPCDS.STORE_SALES
where "SS_STORE_SK" IS NOT NULL and "SS_SOLD_DATE_SK" IS NOT NULL

(2) Filter [codegen id : 1]
Input [4]: [SS_STORE_SK#5229, SS_EXT_SALES_PRICE#5237, SS_NET_PROFIT#5244, SS_SOLD_DATE_SK#5222]
Condition : isnotnull(SS_STORE_SK#5229)

(3) Project [codegen id : 1]
Output [6]: [SS_STORE_SK#5229 AS store_sk#5174, SS_SOLD_DATE_SK#5222 AS date_sk#5175, SS_EXT_SALES_PRICE#5237 AS sales_price#5176, SS_NET_PROFIT#5244 AS profit#5177, 0E-18 AS return_amt#5566, 0E-18 AS net_loss#5567]
Input [4]: [SS_STORE_SK#5229, SS_EXT_SALES_PRICE#5237, SS_NET_PROFIT#5244, SS_SOLD_DATE_SK#5222]

(4) BatchScan
Output [4]: [SR_STORE_SK#5252, SR_RETURN_AMT#5256, SR_NET_LOSS#5264, SR_RETURNED_DATE_SK#5245]
Format: orafile
OraPlan: 00 OraTableScan TPCDS.STORE_RETURNS, [SR_STORE_SK#5617, SR_RETURN_AMT#5618, SR_NET_LOSS#5619, SR_RETURNED_DATE_SK#5620], [oracolumnref(SR_STORE_SK#5617), oracolumnref(SR_RETURN_AMT#5618), oracolumnref(SR_NET_LOSS#5619), oracolumnref(SR_RETURNED_DATE_SK#5620)], orapostfixunaryopexpression(isnotnull(SR_STORE_SK#5252))
PartitionSchema: struct<SR_RETURNED_DATE_SK:decimal(38,18)>
ReadSchema: struct<SR_STORE_SK:decimal(38,18),SR_RETURN_AMT:decimal(38,18),SR_NET_LOSS:decimal(38,18)>
dsKey: DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
oraPushdownSQL: select "SR_STORE_SK", "SR_RETURN_AMT", "SR_NET_LOSS", "SR_RETURNED_DATE_SK"
from TPCDS.STORE_RETURNS
where "SR_STORE_SK" IS NOT NULL and "SR_RETURNED_DATE_SK" IS NOT NULL

(5) Filter [codegen id : 2]
Input [4]: [SR_STORE_SK#5252, SR_RETURN_AMT#5256, SR_NET_LOSS#5264, SR_RETURNED_DATE_SK#5245]
Condition : isnotnull(SR_STORE_SK#5252)

(6) Project [codegen id : 2]
Output [6]: [SR_STORE_SK#5252 AS store_sk#5180, SR_RETURNED_DATE_SK#5245 AS date_sk#5181, 0E-18 AS sales_price#5568, 0E-18 AS profit#5569, SR_RETURN_AMT#5256 AS return_amt#5184, SR_NET_LOSS#5264 AS net_loss#5185]
Input [4]: [SR_STORE_SK#5252, SR_RETURN_AMT#5256, SR_NET_LOSS#5264, SR_RETURNED_DATE_SK#5245]

(7) Union

(8) Exchange
Input [6]: [store_sk#5174, date_sk#5175, sales_price#5176, profit#5177, return_amt#5566, net_loss#5567]
Arguments: hashpartitioning(date_sk#5175, 5), ENSURE_REQUIREMENTS, [id=#2336]

(9) Sort [codegen id : 3]
Input [6]: [store_sk#5174, date_sk#5175, sales_price#5176, profit#5177, return_amt#5566, net_loss#5567]
Arguments: [date_sk#5175 ASC NULLS FIRST], false, 0

(10) BatchScan
Output [2]: [D_DATE_SK#5265, D_DATE#5267]
Format: orafile
OraPlan: 00 OraTableScan TPCDS.DATE_DIM, [D_DATE_SK#5625, D_DATE#5626], [oracolumnref(D_DATE_SK#5625), oracolumnref(D_DATE#5626)], orabinaryopexpression(((isnotnull(D_DATE#5267) AND (D_DATE#5267 >= 11192)) AND (D_DATE#5267 <= 11206)))
PartitionSchema: struct<>
ReadSchema: struct<D_DATE_SK:decimal(38,18),D_DATE:date>
dsKey: DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
oraPushdownBindValues: 11192, 11206
oraPushdownSQL: select "D_DATE_SK", "D_DATE"
from TPCDS.DATE_DIM
where (("D_DATE" IS NOT NULL AND ("D_DATE" >= ?)) AND ("D_DATE" <= ?))

(11) Filter [codegen id : 4]
Input [2]: [D_DATE_SK#5265, D_DATE#5267]
Condition : ((isnotnull(D_DATE#5267) AND (D_DATE#5267 >= 11192)) AND (D_DATE#5267 <= 11206))

(12) Project [codegen id : 4]
Output [1]: [D_DATE_SK#5265]
Input [2]: [D_DATE_SK#5265, D_DATE#5267]

(13) Exchange
Input [1]: [D_DATE_SK#5265]
Arguments: hashpartitioning(d_date_sk#5265, 5), ENSURE_REQUIREMENTS, [id=#2345]

(14) Sort [codegen id : 5]
Input [1]: [D_DATE_SK#5265]
Arguments: [d_date_sk#5265 ASC NULLS FIRST], false, 0

(15) SortMergeJoin [codegen id : 6]
Left keys [1]: [date_sk#5175]
Right keys [1]: [d_date_sk#5265]
Join condition: None

(16) Project [codegen id : 6]
Output [5]: [store_sk#5174, sales_price#5176, profit#5177, return_amt#5566, net_loss#5567]
Input [7]: [store_sk#5174, date_sk#5175, sales_price#5176, profit#5177, return_amt#5566, net_loss#5567, D_DATE_SK#5265]

(17) Exchange
Input [5]: [store_sk#5174, sales_price#5176, profit#5177, return_amt#5566, net_loss#5567]
Arguments: hashpartitioning(store_sk#5174, 5), ENSURE_REQUIREMENTS, [id=#2353]

(18) Sort [codegen id : 7]
Input [5]: [store_sk#5174, sales_price#5176, profit#5177, return_amt#5566, net_loss#5567]
Arguments: [store_sk#5174 ASC NULLS FIRST], false, 0

(19) BatchScan
Output [2]: [S_STORE_SK#5293, S_STORE_ID#5294]
Format: orafile
OraPlan: 00 OraTableScan TPCDS.STORE, [S_STORE_SK#5629, S_STORE_ID#5630], [oracolumnref(S_STORE_SK#5629), oracolumnref(S_STORE_ID#5630)]
PartitionSchema: struct<>
ReadSchema: struct<S_STORE_SK:decimal(38,18),S_STORE_ID:string>
dsKey: DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
oraPushdownSQL: select "S_STORE_SK", "S_STORE_ID"
from TPCDS.STORE

(20) Project [codegen id : 8]
Output [2]: [S_STORE_SK#5293, S_STORE_ID#5294]
Input [2]: [S_STORE_SK#5293, S_STORE_ID#5294]

(21) Exchange
Input [2]: [S_STORE_SK#5293, S_STORE_ID#5294]
Arguments: hashpartitioning(s_store_sk#5293, 5), ENSURE_REQUIREMENTS, [id=#2361]

(22) Sort [codegen id : 9]
Input [2]: [S_STORE_SK#5293, S_STORE_ID#5294]
Arguments: [s_store_sk#5293 ASC NULLS FIRST], false, 0

(23) SortMergeJoin [codegen id : 10]
Left keys [1]: [store_sk#5174]
Right keys [1]: [s_store_sk#5293]
Join condition: None

(24) Project [codegen id : 10]
Output [5]: [sales_price#5176, profit#5177, return_amt#5566, net_loss#5567, S_STORE_ID#5294]
Input [7]: [store_sk#5174, sales_price#5176, profit#5177, return_amt#5566, net_loss#5567, S_STORE_SK#5293, S_STORE_ID#5294]

(25) HashAggregate [codegen id : 10]
Input [5]: [sales_price#5176, profit#5177, return_amt#5566, net_loss#5567, S_STORE_ID#5294]
Keys [1]: [s_store_id#5294]
Functions [4]: [partial_sum(sales_price#5176), partial_sum(return_amt#5566), partial_sum(profit#5177), partial_sum(net_loss#5567)]
Aggregate Attributes [8]: [sum#5701, isEmpty#5702, sum#5703, isEmpty#5704, sum#5705, isEmpty#5706, sum#5707, isEmpty#5708]
Results [9]: [s_store_id#5294, sum#5709, isEmpty#5710, sum#5711, isEmpty#5712, sum#5713, isEmpty#5714, sum#5715, isEmpty#5716]

(26) Exchange
Input [9]: [s_store_id#5294, sum#5709, isEmpty#5710, sum#5711, isEmpty#5712, sum#5713, isEmpty#5714, sum#5715, isEmpty#5716]
Arguments: hashpartitioning(s_store_id#5294, 5), ENSURE_REQUIREMENTS, [id=#2370]

(27) HashAggregate [codegen id : 11]
Input [9]: [s_store_id#5294, sum#5709, isEmpty#5710, sum#5711, isEmpty#5712, sum#5713, isEmpty#5714, sum#5715, isEmpty#5716]
Keys [1]: [s_store_id#5294]
Functions [4]: [sum(sales_price#5176), sum(return_amt#5566), sum(profit#5177), sum(net_loss#5567)]
Aggregate Attributes [4]: [sum(sales_price#5176)#5578, sum(return_amt#5566)#5580, sum(profit#5177)#5579, sum(net_loss#5567)#5581]
Results [5]: [sum(sales_price#5176)#5578 AS sales#5186, sum(return_amt#5566)#5580 AS returns#5188, CheckOverflow((promote_precision(cast(sum(profit#5177)#5579 as decimal(38,17))) - promote_precision(cast(sum(net_loss#5567)#5581 as decimal(38,17)))), DecimalType(38,17), true) AS profit#5164, store channel AS channel#5593, concat(store, s_store_id#5294) AS id#5594]

(28) BatchScan
Output [4]: [CS_CATALOG_PAGE_SK#5334, CS_EXT_SALES_PRICE#5345, CS_NET_PROFIT#5355, CS_SOLD_DATE_SK#5322]
Format: orafile
OraPlan: 00 OraTableScan TPCDS.CATALOG_SALES, [CS_CATALOG_PAGE_SK#5633, CS_EXT_SALES_PRICE#5634, CS_NET_PROFIT#5635, CS_SOLD_DATE_SK#5636], [oracolumnref(CS_CATALOG_PAGE_SK#5633), oracolumnref(CS_EXT_SALES_PRICE#5634), oracolumnref(CS_NET_PROFIT#5635), oracolumnref(CS_SOLD_DATE_SK#5636)], orapostfixunaryopexpression(isnotnull(CS_CATALOG_PAGE_SK#5334))
PartitionSchema: struct<CS_SOLD_DATE_SK:decimal(38,18)>
ReadSchema: struct<CS_CATALOG_PAGE_SK:decimal(38,18),CS_EXT_SALES_PRICE:decimal(38,18),CS_NET_PROFIT:decimal(38,18)>
dsKey: DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
oraPushdownSQL: select "CS_CATALOG_PAGE_SK", "CS_EXT_SALES_PRICE", "CS_NET_PROFIT", "CS_SOLD_DATE_SK"
from TPCDS.CATALOG_SALES
where "CS_CATALOG_PAGE_SK" IS NOT NULL and "CS_SOLD_DATE_SK" IS NOT NULL

(29) Filter [codegen id : 12]
Input [4]: [CS_CATALOG_PAGE_SK#5334, CS_EXT_SALES_PRICE#5345, CS_NET_PROFIT#5355, CS_SOLD_DATE_SK#5322]
Condition : isnotnull(CS_CATALOG_PAGE_SK#5334)

(30) Project [codegen id : 12]
Output [6]: [CS_CATALOG_PAGE_SK#5334 AS page_sk#5190, CS_SOLD_DATE_SK#5322 AS date_sk#5191, CS_EXT_SALES_PRICE#5345 AS sales_price#5192, CS_NET_PROFIT#5355 AS profit#5193, 0E-18 AS return_amt#5570, 0E-18 AS net_loss#5571]
Input [4]: [CS_CATALOG_PAGE_SK#5334, CS_EXT_SALES_PRICE#5345, CS_NET_PROFIT#5355, CS_SOLD_DATE_SK#5322]

(31) BatchScan
Output [4]: [CR_CATALOG_PAGE_SK#5368, CR_RETURN_AMOUNT#5374, CR_NET_LOSS#5382, CR_RETURNED_DATE_SK#5356]
Format: orafile
OraPlan: 00 OraTableScan TPCDS.CATALOG_RETURNS, [CR_CATALOG_PAGE_SK#5641, CR_RETURN_AMOUNT#5642, CR_NET_LOSS#5643, CR_RETURNED_DATE_SK#5644], [oracolumnref(CR_CATALOG_PAGE_SK#5641), oracolumnref(CR_RETURN_AMOUNT#5642), oracolumnref(CR_NET_LOSS#5643), oracolumnref(CR_RETURNED_DATE_SK#5644)], orapostfixunaryopexpression(isnotnull(CR_CATALOG_PAGE_SK#5368))
PartitionSchema: struct<CR_RETURNED_DATE_SK:decimal(38,18)>
ReadSchema: struct<CR_CATALOG_PAGE_SK:decimal(38,18),CR_RETURN_AMOUNT:decimal(38,18),CR_NET_LOSS:decimal(38,18)>
dsKey: DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
oraPushdownSQL: select "CR_CATALOG_PAGE_SK", "CR_RETURN_AMOUNT", "CR_NET_LOSS", "CR_RETURNED_DATE_SK"
from TPCDS.CATALOG_RETURNS
where "CR_CATALOG_PAGE_SK" IS NOT NULL and "CR_RETURNED_DATE_SK" IS NOT NULL

(32) Filter [codegen id : 13]
Input [4]: [CR_CATALOG_PAGE_SK#5368, CR_RETURN_AMOUNT#5374, CR_NET_LOSS#5382, CR_RETURNED_DATE_SK#5356]
Condition : isnotnull(CR_CATALOG_PAGE_SK#5368)

(33) Project [codegen id : 13]
Output [6]: [CR_CATALOG_PAGE_SK#5368 AS page_sk#5196, CR_RETURNED_DATE_SK#5356 AS date_sk#5197, 0E-18 AS sales_price#5572, 0E-18 AS profit#5573, CR_RETURN_AMOUNT#5374 AS return_amt#5200, CR_NET_LOSS#5382 AS net_loss#5201]
Input [4]: [CR_CATALOG_PAGE_SK#5368, CR_RETURN_AMOUNT#5374, CR_NET_LOSS#5382, CR_RETURNED_DATE_SK#5356]

(34) Union

(35) Exchange
Input [6]: [page_sk#5190, date_sk#5191, sales_price#5192, profit#5193, return_amt#5570, net_loss#5571]
Arguments: hashpartitioning(date_sk#5191, 5), ENSURE_REQUIREMENTS, [id=#2383]

(36) Sort [codegen id : 14]
Input [6]: [page_sk#5190, date_sk#5191, sales_price#5192, profit#5193, return_amt#5570, net_loss#5571]
Arguments: [date_sk#5191 ASC NULLS FIRST], false, 0

(37) BatchScan
Output [2]: [D_DATE_SK#5383, D_DATE#5385]
Format: orafile
OraPlan: 00 OraTableScan TPCDS.DATE_DIM, [D_DATE_SK#5649, D_DATE#5650], [oracolumnref(D_DATE_SK#5649), oracolumnref(D_DATE#5650)], orabinaryopexpression(((isnotnull(D_DATE#5385) AND (D_DATE#5385 >= 11192)) AND (D_DATE#5385 <= 11206)))
PartitionSchema: struct<>
ReadSchema: struct<D_DATE_SK:decimal(38,18),D_DATE:date>
dsKey: DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
oraPushdownBindValues: 11192, 11206
oraPushdownSQL: select "D_DATE_SK", "D_DATE"
from TPCDS.DATE_DIM
where (("D_DATE" IS NOT NULL AND ("D_DATE" >= ?)) AND ("D_DATE" <= ?))

(38) Filter [codegen id : 15]
Input [2]: [D_DATE_SK#5383, D_DATE#5385]
Condition : ((isnotnull(D_DATE#5385) AND (D_DATE#5385 >= 11192)) AND (D_DATE#5385 <= 11206))

(39) Project [codegen id : 15]
Output [1]: [D_DATE_SK#5383]
Input [2]: [D_DATE_SK#5383, D_DATE#5385]

(40) Exchange
Input [1]: [D_DATE_SK#5383]
Arguments: hashpartitioning(d_date_sk#5383, 5), ENSURE_REQUIREMENTS, [id=#2392]

(41) Sort [codegen id : 16]
Input [1]: [D_DATE_SK#5383]
Arguments: [d_date_sk#5383 ASC NULLS FIRST], false, 0

(42) SortMergeJoin [codegen id : 17]
Left keys [1]: [date_sk#5191]
Right keys [1]: [d_date_sk#5383]
Join condition: None

(43) Project [codegen id : 17]
Output [5]: [page_sk#5190, sales_price#5192, profit#5193, return_amt#5570, net_loss#5571]
Input [7]: [page_sk#5190, date_sk#5191, sales_price#5192, profit#5193, return_amt#5570, net_loss#5571, D_DATE_SK#5383]

(44) Exchange
Input [5]: [page_sk#5190, sales_price#5192, profit#5193, return_amt#5570, net_loss#5571]
Arguments: hashpartitioning(page_sk#5190, 5), ENSURE_REQUIREMENTS, [id=#2400]

(45) Sort [codegen id : 18]
Input [5]: [page_sk#5190, sales_price#5192, profit#5193, return_amt#5570, net_loss#5571]
Arguments: [page_sk#5190 ASC NULLS FIRST], false, 0

(46) BatchScan
Output [2]: [CP_CATALOG_PAGE_SK#5411, CP_CATALOG_PAGE_ID#5412]
Format: orafile
OraPlan: 00 OraTableScan TPCDS.CATALOG_PAGE, [CP_CATALOG_PAGE_SK#5653, CP_CATALOG_PAGE_ID#5654], [oracolumnref(CP_CATALOG_PAGE_SK#5653), oracolumnref(CP_CATALOG_PAGE_ID#5654)]
PartitionSchema: struct<>
ReadSchema: struct<CP_CATALOG_PAGE_SK:decimal(38,18),CP_CATALOG_PAGE_ID:string>
dsKey: DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
oraPushdownSQL: select "CP_CATALOG_PAGE_SK", "CP_CATALOG_PAGE_ID"
from TPCDS.CATALOG_PAGE

(47) Project [codegen id : 19]
Output [2]: [CP_CATALOG_PAGE_SK#5411, CP_CATALOG_PAGE_ID#5412]
Input [2]: [CP_CATALOG_PAGE_SK#5411, CP_CATALOG_PAGE_ID#5412]

(48) Exchange
Input [2]: [CP_CATALOG_PAGE_SK#5411, CP_CATALOG_PAGE_ID#5412]
Arguments: hashpartitioning(cp_catalog_page_sk#5411, 5), ENSURE_REQUIREMENTS, [id=#2408]

(49) Sort [codegen id : 20]
Input [2]: [CP_CATALOG_PAGE_SK#5411, CP_CATALOG_PAGE_ID#5412]
Arguments: [cp_catalog_page_sk#5411 ASC NULLS FIRST], false, 0

(50) SortMergeJoin [codegen id : 21]
Left keys [1]: [page_sk#5190]
Right keys [1]: [cp_catalog_page_sk#5411]
Join condition: None

(51) Project [codegen id : 21]
Output [5]: [sales_price#5192, profit#5193, return_amt#5570, net_loss#5571, CP_CATALOG_PAGE_ID#5412]
Input [7]: [page_sk#5190, sales_price#5192, profit#5193, return_amt#5570, net_loss#5571, CP_CATALOG_PAGE_SK#5411, CP_CATALOG_PAGE_ID#5412]

(52) HashAggregate [codegen id : 21]
Input [5]: [sales_price#5192, profit#5193, return_amt#5570, net_loss#5571, CP_CATALOG_PAGE_ID#5412]
Keys [1]: [cp_catalog_page_id#5412]
Functions [4]: [partial_sum(sales_price#5192), partial_sum(return_amt#5570), partial_sum(profit#5193), partial_sum(net_loss#5571)]
Aggregate Attributes [8]: [sum#5717, isEmpty#5718, sum#5719, isEmpty#5720, sum#5721, isEmpty#5722, sum#5723, isEmpty#5724]
Results [9]: [cp_catalog_page_id#5412, sum#5725, isEmpty#5726, sum#5727, isEmpty#5728, sum#5729, isEmpty#5730, sum#5731, isEmpty#5732]

(53) Exchange
Input [9]: [cp_catalog_page_id#5412, sum#5725, isEmpty#5726, sum#5727, isEmpty#5728, sum#5729, isEmpty#5730, sum#5731, isEmpty#5732]
Arguments: hashpartitioning(cp_catalog_page_id#5412, 5), ENSURE_REQUIREMENTS, [id=#2417]

(54) HashAggregate [codegen id : 22]
Input [9]: [cp_catalog_page_id#5412, sum#5725, isEmpty#5726, sum#5727, isEmpty#5728, sum#5729, isEmpty#5730, sum#5731, isEmpty#5732]
Keys [1]: [cp_catalog_page_id#5412]
Functions [4]: [sum(sales_price#5192), sum(return_amt#5570), sum(profit#5193), sum(net_loss#5571)]
Aggregate Attributes [4]: [sum(sales_price#5192)#5582, sum(return_amt#5570)#5584, sum(profit#5193)#5583, sum(net_loss#5571)#5585]
Results [5]: [sum(sales_price#5192)#5582 AS sales#5202, sum(return_amt#5570)#5584 AS returns#5204, CheckOverflow((promote_precision(cast(sum(profit#5193)#5583 as decimal(38,17))) - promote_precision(cast(sum(net_loss#5571)#5585 as decimal(38,17)))), DecimalType(38,17), true) AS profit#5167, catalog channel AS channel#5605, concat(catalog_page, cp_catalog_page_id#5412) AS id#5606]

(55) BatchScan
Output [4]: [WS_WEB_SITE_SK#5433, WS_EXT_SALES_PRICE#5443, WS_NET_PROFIT#5453, WS_SOLD_DATE_SK#5420]
Format: orafile
OraPlan: 00 OraTableScan TPCDS.WEB_SALES, [WS_WEB_SITE_SK#5657, WS_EXT_SALES_PRICE#5658, WS_NET_PROFIT#5659, WS_SOLD_DATE_SK#5660], [oracolumnref(WS_WEB_SITE_SK#5657), oracolumnref(WS_EXT_SALES_PRICE#5658), oracolumnref(WS_NET_PROFIT#5659), oracolumnref(WS_SOLD_DATE_SK#5660)], orapostfixunaryopexpression(isnotnull(WS_WEB_SITE_SK#5433))
PartitionSchema: struct<WS_SOLD_DATE_SK:decimal(38,18)>
ReadSchema: struct<WS_WEB_SITE_SK:decimal(38,18),WS_EXT_SALES_PRICE:decimal(38,18),WS_NET_PROFIT:decimal(38,18)>
dsKey: DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
oraPushdownSQL: select "WS_WEB_SITE_SK", "WS_EXT_SALES_PRICE", "WS_NET_PROFIT", "WS_SOLD_DATE_SK"
from TPCDS.WEB_SALES
where "WS_WEB_SITE_SK" IS NOT NULL and "WS_SOLD_DATE_SK" IS NOT NULL

(56) Filter [codegen id : 23]
Input [4]: [WS_WEB_SITE_SK#5433, WS_EXT_SALES_PRICE#5443, WS_NET_PROFIT#5453, WS_SOLD_DATE_SK#5420]
Condition : isnotnull(WS_WEB_SITE_SK#5433)

(57) Project [codegen id : 23]
Output [6]: [WS_WEB_SITE_SK#5433 AS wsr_web_site_sk#5206, WS_SOLD_DATE_SK#5420 AS date_sk#5207, WS_EXT_SALES_PRICE#5443 AS sales_price#5208, WS_NET_PROFIT#5453 AS profit#5209, 0E-18 AS return_amt#5574, 0E-18 AS net_loss#5575]
Input [4]: [WS_WEB_SITE_SK#5433, WS_EXT_SALES_PRICE#5443, WS_NET_PROFIT#5453, WS_SOLD_DATE_SK#5420]

(58) BatchScan
Output [5]: [WR_ITEM_SK#5456, WR_ORDER_NUMBER#5467, WR_RETURN_AMT#5469, WR_NET_LOSS#5477, WR_RETURNED_DATE_SK#5454]
Format: orafile
OraPlan: 00 OraTableScan TPCDS.WEB_RETURNS, [WR_ITEM_SK#5665, WR_ORDER_NUMBER#5666, WR_RETURN_AMT#5667, WR_NET_LOSS#5668, WR_RETURNED_DATE_SK#5669], [oracolumnref(WR_ITEM_SK#5665), oracolumnref(WR_ORDER_NUMBER#5666), oracolumnref(WR_RETURN_AMT#5667), oracolumnref(WR_NET_LOSS#5668), oracolumnref(WR_RETURNED_DATE_SK#5669)]
PartitionSchema: struct<WR_RETURNED_DATE_SK:decimal(38,18)>
ReadSchema: struct<WR_ITEM_SK:decimal(38,18),WR_ORDER_NUMBER:decimal(38,18),WR_RETURN_AMT:decimal(38,18),WR_NET_LOSS:decimal(38,18)>
dsKey: DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
oraPushdownSQL: select "WR_ITEM_SK", "WR_ORDER_NUMBER", "WR_RETURN_AMT", "WR_NET_LOSS", "WR_RETURNED_DATE_SK"
from TPCDS.WEB_RETURNS
where "WR_RETURNED_DATE_SK" IS NOT NULL

(59) Project [codegen id : 24]
Output [5]: [WR_RETURNED_DATE_SK#5454, WR_ITEM_SK#5456, WR_ORDER_NUMBER#5467, WR_RETURN_AMT#5469, WR_NET_LOSS#5477]
Input [5]: [WR_ITEM_SK#5456, WR_ORDER_NUMBER#5467, WR_RETURN_AMT#5469, WR_NET_LOSS#5477, WR_RETURNED_DATE_SK#5454]

(60) Exchange
Input [5]: [WR_RETURNED_DATE_SK#5454, WR_ITEM_SK#5456, WR_ORDER_NUMBER#5467, WR_RETURN_AMT#5469, WR_NET_LOSS#5477]
Arguments: hashpartitioning(wr_item_sk#5456, wr_order_number#5467, 5), ENSURE_REQUIREMENTS, [id=#2428]

(61) Sort [codegen id : 25]
Input [5]: [WR_RETURNED_DATE_SK#5454, WR_ITEM_SK#5456, WR_ORDER_NUMBER#5467, WR_RETURN_AMT#5469, WR_NET_LOSS#5477]
Arguments: [wr_item_sk#5456 ASC NULLS FIRST, wr_order_number#5467 ASC NULLS FIRST], false, 0

(62) BatchScan
Output [3]: [WS_ITEM_SK#5481, WS_WEB_SITE_SK#5491, WS_ORDER_NUMBER#5495]
Format: orafile
OraPlan: 00 OraTableScan TPCDS.WEB_SALES, [WS_ITEM_SK#5675, WS_WEB_SITE_SK#5676, WS_ORDER_NUMBER#5677], [oracolumnref(WS_ITEM_SK#5675), oracolumnref(WS_WEB_SITE_SK#5676), oracolumnref(WS_ORDER_NUMBER#5677)], orapostfixunaryopexpression(isnotnull(WS_WEB_SITE_SK#5491))
PartitionSchema: struct<>
ReadSchema: struct<WS_ITEM_SK:decimal(38,18),WS_WEB_SITE_SK:decimal(38,18),WS_ORDER_NUMBER:decimal(38,18)>
dsKey: DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
oraPushdownSQL: select "WS_ITEM_SK", "WS_WEB_SITE_SK", "WS_ORDER_NUMBER"
from TPCDS.WEB_SALES
where "WS_WEB_SITE_SK" IS NOT NULL

(63) Filter [codegen id : 26]
Input [3]: [WS_ITEM_SK#5481, WS_WEB_SITE_SK#5491, WS_ORDER_NUMBER#5495]
Condition : isnotnull(WS_WEB_SITE_SK#5491)

(64) Exchange
Input [3]: [WS_ITEM_SK#5481, WS_WEB_SITE_SK#5491, WS_ORDER_NUMBER#5495]
Arguments: hashpartitioning(ws_item_sk#5481, ws_order_number#5495, 5), ENSURE_REQUIREMENTS, [id=#2436]

(65) Sort [codegen id : 27]
Input [3]: [WS_ITEM_SK#5481, WS_WEB_SITE_SK#5491, WS_ORDER_NUMBER#5495]
Arguments: [ws_item_sk#5481 ASC NULLS FIRST, ws_order_number#5495 ASC NULLS FIRST], false, 0

(66) SortMergeJoin [codegen id : 28]
Left keys [2]: [wr_item_sk#5456, wr_order_number#5467]
Right keys [2]: [ws_item_sk#5481, ws_order_number#5495]
Join condition: None

(67) Project [codegen id : 28]
Output [6]: [ws_web_site_sk#5491 AS wsr_web_site_sk#5212, wr_returned_date_sk#5454 AS date_sk#5213, 0E-18 AS sales_price#5576, 0E-18 AS profit#5577, wr_return_amt#5469 AS return_amt#5216, wr_net_loss#5477 AS net_loss#5217]
Input [8]: [WR_RETURNED_DATE_SK#5454, WR_ITEM_SK#5456, WR_ORDER_NUMBER#5467, WR_RETURN_AMT#5469, WR_NET_LOSS#5477, WS_ITEM_SK#5481, WS_WEB_SITE_SK#5491, WS_ORDER_NUMBER#5495]

(68) Union

(69) Exchange
Input [6]: [wsr_web_site_sk#5206, date_sk#5207, sales_price#5208, profit#5209, return_amt#5574, net_loss#5575]
Arguments: hashpartitioning(date_sk#5207, 5), ENSURE_REQUIREMENTS, [id=#2445]

(70) Sort [codegen id : 29]
Input [6]: [wsr_web_site_sk#5206, date_sk#5207, sales_price#5208, profit#5209, return_amt#5574, net_loss#5575]
Arguments: [date_sk#5207 ASC NULLS FIRST], false, 0

(71) BatchScan
Output [2]: [D_DATE_SK#5512, D_DATE#5514]
Format: orafile
OraPlan: 00 OraTableScan TPCDS.DATE_DIM, [D_DATE_SK#5681, D_DATE#5682], [oracolumnref(D_DATE_SK#5681), oracolumnref(D_DATE#5682)], orabinaryopexpression(((isnotnull(D_DATE#5514) AND (D_DATE#5514 >= 11192)) AND (D_DATE#5514 <= 11206)))
PartitionSchema: struct<>
ReadSchema: struct<D_DATE_SK:decimal(38,18),D_DATE:date>
dsKey: DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
oraPushdownBindValues: 11192, 11206
oraPushdownSQL: select "D_DATE_SK", "D_DATE"
from TPCDS.DATE_DIM
where (("D_DATE" IS NOT NULL AND ("D_DATE" >= ?)) AND ("D_DATE" <= ?))

(72) Filter [codegen id : 30]
Input [2]: [D_DATE_SK#5512, D_DATE#5514]
Condition : ((isnotnull(D_DATE#5514) AND (D_DATE#5514 >= 11192)) AND (D_DATE#5514 <= 11206))

(73) Project [codegen id : 30]
Output [1]: [D_DATE_SK#5512]
Input [2]: [D_DATE_SK#5512, D_DATE#5514]

(74) Exchange
Input [1]: [D_DATE_SK#5512]
Arguments: hashpartitioning(d_date_sk#5512, 5), ENSURE_REQUIREMENTS, [id=#2454]

(75) Sort [codegen id : 31]
Input [1]: [D_DATE_SK#5512]
Arguments: [d_date_sk#5512 ASC NULLS FIRST], false, 0

(76) SortMergeJoin [codegen id : 32]
Left keys [1]: [date_sk#5207]
Right keys [1]: [d_date_sk#5512]
Join condition: None

(77) Project [codegen id : 32]
Output [5]: [wsr_web_site_sk#5206, sales_price#5208, profit#5209, return_amt#5574, net_loss#5575]
Input [7]: [wsr_web_site_sk#5206, date_sk#5207, sales_price#5208, profit#5209, return_amt#5574, net_loss#5575, D_DATE_SK#5512]

(78) Exchange
Input [5]: [wsr_web_site_sk#5206, sales_price#5208, profit#5209, return_amt#5574, net_loss#5575]
Arguments: hashpartitioning(wsr_web_site_sk#5206, 5), ENSURE_REQUIREMENTS, [id=#2462]

(79) Sort [codegen id : 33]
Input [5]: [wsr_web_site_sk#5206, sales_price#5208, profit#5209, return_amt#5574, net_loss#5575]
Arguments: [wsr_web_site_sk#5206 ASC NULLS FIRST], false, 0

(80) BatchScan
Output [2]: [WEB_SITE_SK#5540, WEB_SITE_ID#5541]
Format: orafile
OraPlan: 00 OraTableScan TPCDS.WEB_SITE, [WEB_SITE_SK#5685, WEB_SITE_ID#5686], [oracolumnref(WEB_SITE_SK#5685), oracolumnref(WEB_SITE_ID#5686)]
PartitionSchema: struct<>
ReadSchema: struct<WEB_SITE_SK:decimal(38,18),WEB_SITE_ID:string>
dsKey: DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
oraPushdownSQL: select "WEB_SITE_SK", "WEB_SITE_ID"
from TPCDS.WEB_SITE

(81) Project [codegen id : 34]
Output [2]: [WEB_SITE_SK#5540, WEB_SITE_ID#5541]
Input [2]: [WEB_SITE_SK#5540, WEB_SITE_ID#5541]

(82) Exchange
Input [2]: [WEB_SITE_SK#5540, WEB_SITE_ID#5541]
Arguments: hashpartitioning(web_site_sk#5540, 5), ENSURE_REQUIREMENTS, [id=#2470]

(83) Sort [codegen id : 35]
Input [2]: [WEB_SITE_SK#5540, WEB_SITE_ID#5541]
Arguments: [web_site_sk#5540 ASC NULLS FIRST], false, 0

(84) SortMergeJoin [codegen id : 36]
Left keys [1]: [wsr_web_site_sk#5206]
Right keys [1]: [web_site_sk#5540]
Join condition: None

(85) Project [codegen id : 36]
Output [5]: [sales_price#5208, profit#5209, return_amt#5574, net_loss#5575, WEB_SITE_ID#5541]
Input [7]: [wsr_web_site_sk#5206, sales_price#5208, profit#5209, return_amt#5574, net_loss#5575, WEB_SITE_SK#5540, WEB_SITE_ID#5541]

(86) HashAggregate [codegen id : 36]
Input [5]: [sales_price#5208, profit#5209, return_amt#5574, net_loss#5575, WEB_SITE_ID#5541]
Keys [1]: [web_site_id#5541]
Functions [4]: [partial_sum(sales_price#5208), partial_sum(return_amt#5574), partial_sum(profit#5209), partial_sum(net_loss#5575)]
Aggregate Attributes [8]: [sum#5733, isEmpty#5734, sum#5735, isEmpty#5736, sum#5737, isEmpty#5738, sum#5739, isEmpty#5740]
Results [9]: [web_site_id#5541, sum#5741, isEmpty#5742, sum#5743, isEmpty#5744, sum#5745, isEmpty#5746, sum#5747, isEmpty#5748]

(87) Exchange
Input [9]: [web_site_id#5541, sum#5741, isEmpty#5742, sum#5743, isEmpty#5744, sum#5745, isEmpty#5746, sum#5747, isEmpty#5748]
Arguments: hashpartitioning(web_site_id#5541, 5), ENSURE_REQUIREMENTS, [id=#2479]

(88) HashAggregate [codegen id : 37]
Input [9]: [web_site_id#5541, sum#5741, isEmpty#5742, sum#5743, isEmpty#5744, sum#5745, isEmpty#5746, sum#5747, isEmpty#5748]
Keys [1]: [web_site_id#5541]
Functions [4]: [sum(sales_price#5208), sum(return_amt#5574), sum(profit#5209), sum(net_loss#5575)]
Aggregate Attributes [4]: [sum(sales_price#5208)#5586, sum(return_amt#5574)#5588, sum(profit#5209)#5587, sum(net_loss#5575)#5589]
Results [5]: [sum(sales_price#5208)#5586 AS sales#5218, sum(return_amt#5574)#5588 AS returns#5220, CheckOverflow((promote_precision(cast(sum(profit#5209)#5587 as decimal(38,17))) - promote_precision(cast(sum(net_loss#5575)#5589 as decimal(38,17)))), DecimalType(38,17), true) AS profit#5170, web channel AS channel#5607, concat(web_site, web_site_id#5541) AS id#5608]

(89) Union

(90) Expand [codegen id : 38]
Input [5]: [sales#5186, returns#5188, profit#5164, channel#5593, id#5594]
Arguments: [List(sales#5186, returns#5188, profit#5164, channel#5593, id#5594, 0), List(sales#5186, returns#5188, profit#5164, channel#5593, null, 1), List(sales#5186, returns#5188, profit#5164, null, null, 3)], [sales#5186, returns#5188, profit#5164, channel#5596, id#5597, spark_grouping_id#5595L]

(91) HashAggregate [codegen id : 38]
Input [6]: [sales#5186, returns#5188, profit#5164, channel#5596, id#5597, spark_grouping_id#5595L]
Keys [3]: [channel#5596, id#5597, spark_grouping_id#5595L]
Functions [3]: [partial_sum(sales#5186), partial_sum(returns#5188), partial_sum(profit#5164)]
Aggregate Attributes [6]: [sum#5689, isEmpty#5690, sum#5691, isEmpty#5692, sum#5693, isEmpty#5694]
Results [9]: [channel#5596, id#5597, spark_grouping_id#5595L, sum#5695, isEmpty#5696, sum#5697, isEmpty#5698, sum#5699, isEmpty#5700]

(92) Exchange
Input [9]: [channel#5596, id#5597, spark_grouping_id#5595L, sum#5695, isEmpty#5696, sum#5697, isEmpty#5698, sum#5699, isEmpty#5700]
Arguments: hashpartitioning(channel#5596, id#5597, spark_grouping_id#5595L, 5), ENSURE_REQUIREMENTS, [id=#2488]

(93) HashAggregate [codegen id : 39]
Input [9]: [channel#5596, id#5597, spark_grouping_id#5595L, sum#5695, isEmpty#5696, sum#5697, isEmpty#5698, sum#5699, isEmpty#5700]
Keys [3]: [channel#5596, id#5597, spark_grouping_id#5595L]
Functions [3]: [sum(sales#5186), sum(returns#5188), sum(profit#5164)]
Aggregate Attributes [3]: [sum(sales#5186)#5590, sum(returns#5188)#5591, sum(profit#5164)#5592]
Results [5]: [channel#5596, id#5597, sum(sales#5186)#5590 AS sales#5171, sum(returns#5188)#5591 AS returns#5172, sum(profit#5164)#5592 AS profit#5173]

(94) TakeOrderedAndProject
Input [5]: [channel#5596, id#5597, sales#5171, returns#5172, profit#5173]
Arguments: 100, [channel#5596 ASC NULLS FIRST, id#5597 ASC NULLS FIRST], [channel#5596, id#5597, sales#5171, returns#5172, profit#5173]


Query q6

Spark SQL

select  a.ca_state state, count(*) cnt
 from customer_address a
     ,customer c
     ,store_sales s
     ,date_dim d
     ,item i
 where       a.ca_address_sk = c.c_current_addr_sk
 	and c.c_customer_sk = s.ss_customer_sk
 	and s.ss_sold_date_sk = d.d_date_sk
 	and s.ss_item_sk = i.i_item_sk
 	and d.d_month_seq =
 	     (select distinct (d_month_seq)
 	      from date_dim
               where d_year = 2001
 	        and d_moy = 1 )
 	and i.i_current_price > 1.2 *
             (select avg(j.i_current_price)
 	     from item j
 	     where j.i_category = i.i_category)
 group by a.ca_state
 having count(*) >= 10
 order by cnt
  limit 100;
 

Spark Plan with Pushdown turned on

Project (1)
+- BatchScan (2)

(2) BatchScan
Oracle Instance:
   DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
Pushdown Oracle SQL:
select "state", "cnt"
from ( select "state", "cnt"
from ( select "CA_STATE" AS "state", COUNT(1) AS "cnt", COUNT(1) AS "count(1)"
from TPCDS.CUSTOMER_ADDRESS  join TPCDS.CUSTOMER  on ("CA_ADDRESS_SK" = "C_CURRENT_ADDR_SK") join TPCDS.STORE_SALES  on ("C_CUSTOMER_SK" = "SS_CUSTOMER_SK") join TPCDS.DATE_DIM  on ("SS_SOLD_DATE_SK" = "D_DATE_SK") join ( select "I_ITEM_SK"
from ( select "I_ITEM_SK", "I_CURRENT_PRICE", "sparkora_0"."I_CATEGORY" AS "I_CATEGORY_1_sparkora", "avg(i_current_price)", "sparkora_1"."I_CATEGORY" AS "I_CATEGORY_2_sparkora"
from ( select "I_ITEM_SK", "I_CURRENT_PRICE", "I_CATEGORY"
from TPCDS.ITEM 
where "I_CURRENT_PRICE" IS NOT NULL ) "sparkora_0" left outer join ( select AVG("I_CURRENT_PRICE") AS "avg(i_current_price)", "I_CATEGORY"
from TPCDS.ITEM 
where "I_CATEGORY" IS NOT NULL
group by "I_CATEGORY" ) "sparkora_1" on ("sparkora_0"."I_CATEGORY" = "sparkora_1"."I_CATEGORY") ) 
where (cast("I_CURRENT_PRICE" as NUMBER(38, 20)) > (1.2000000000000000000000 * "avg(i_current_price)")) )  on ("SS_ITEM_SK" = "I_ITEM_SK")
where (("C_CURRENT_ADDR_SK" IS NOT NULL AND ("SS_CUSTOMER_SK" IS NOT NULL AND "SS_SOLD_DATE_SK" IS NOT NULL)) AND ("D_MONTH_SEQ" IS NOT NULL AND ("D_MONTH_SEQ" =  ( select "D_MONTH_SEQ"
from TPCDS.DATE_DIM 
where ((("D_YEAR" IS NOT NULL AND "D_MOY" IS NOT NULL) AND ("D_YEAR" = 2001.000000000000000000)) AND ("D_MOY" = 1.000000000000000000))
group by "D_MONTH_SEQ" ))))
group by "CA_STATE" ) 
where ("count(1)" >= 10)
order by "cnt" ASC NULLS FIRST ) 
where rownum <= 100
Pushdown Oracle SQL, oracle plan stats estimates:
rowCount = 3, bytes=51
Pushdown Oracle SQL, Query Splitting details:
Query is not split

Spark Plan with Pushdown turned off

== Physical Plan ==
TakeOrderedAndProject (48)
+- * Project (47)
   +- * Filter (46)
      +- * HashAggregate (45)
         +- Exchange (44)
            +- * HashAggregate (43)
               +- * Project (42)
                  +- * SortMergeJoin Inner (41)
                     :- * Sort (27)
                     :  +- Exchange (26)
                     :     +- * Project (25)
                     :        +- * SortMergeJoin Inner (24)
                     :           :- * Sort (18)
                     :           :  +- Exchange (17)
                     :           :     +- * Project (16)
                     :           :        +- * SortMergeJoin Inner (15)
                     :           :           :- * Sort (10)
                     :           :           :  +- Exchange (9)
                     :           :           :     +- * Project (8)
                     :           :           :        +- * SortMergeJoin Inner (7)
                     :           :           :           :- * Sort (3)
                     :           :           :           :  +- * Project (2)
                     :           :           :           :     +- BatchScan (1)
                     :           :           :           +- * Sort (6)
                     :           :           :              +- * Filter (5)
                     :           :           :                 +- BatchScan (4)
                     :           :           +- * Sort (14)
                     :           :              +- Exchange (13)
                     :           :                 +- * Filter (12)
                     :           :                    +- BatchScan (11)
                     :           +- * Sort (23)
                     :              +- Exchange (22)
                     :                 +- * Project (21)
                     :                    +- * Filter (20)
                     :                       +- BatchScan (19)
                     +- * Sort (40)
                        +- Exchange (39)
                           +- * Project (38)
                              +- * Filter (37)
                                 +- SortMergeJoin LeftOuter (36)
                                    :- * Sort (30)
                                    :  +- * Filter (29)
                                    :     +- BatchScan (28)
                                    +- * Sort (35)
                                       +- * HashAggregate (34)
                                          +- * HashAggregate (33)
                                             +- * Filter (32)
                                                +- BatchScan (31)


(1) BatchScan
Output [2]: [CA_ADDRESS_SK#6287, CA_STATE#6295]
Format: orafile
OraPlan: 00 OraTableScan TPCDS.CUSTOMER_ADDRESS, [CA_ADDRESS_SK#6461, CA_STATE#6462], [oracolumnref(CA_ADDRESS_SK#6461), oracolumnref(CA_STATE#6462)]
PartitionSchema: struct<>
ReadSchema: struct<CA_ADDRESS_SK:decimal(38,18),CA_STATE:string>
dsKey: DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
oraPushdownSQL: select "CA_ADDRESS_SK", "CA_STATE"
from TPCDS.CUSTOMER_ADDRESS

(2) Project [codegen id : 1]
Output [2]: [CA_ADDRESS_SK#6287, CA_STATE#6295]
Input [2]: [CA_ADDRESS_SK#6287, CA_STATE#6295]

(3) Sort [codegen id : 1]
Input [2]: [CA_ADDRESS_SK#6287, CA_STATE#6295]
Arguments: [ca_address_sk#6287 ASC NULLS FIRST], false, 0

(4) BatchScan
Output [2]: [C_CUSTOMER_SK#6300, C_CURRENT_ADDR_SK#6304]
Format: orafile
OraPlan: 00 OraTableScan TPCDS.CUSTOMER, [C_CUSTOMER_SK#6465, C_CURRENT_ADDR_SK#6466], [oracolumnref(C_CUSTOMER_SK#6465), oracolumnref(C_CURRENT_ADDR_SK#6466)], orapostfixunaryopexpression(isnotnull(C_CURRENT_ADDR_SK#6304))
PartitionSchema: struct<>
ReadSchema: struct<C_CUSTOMER_SK:decimal(38,18),C_CURRENT_ADDR_SK:decimal(38,18)>
dsKey: DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
oraPushdownSQL: select "C_CUSTOMER_SK", "C_CURRENT_ADDR_SK"
from TPCDS.CUSTOMER
where "C_CURRENT_ADDR_SK" IS NOT NULL

(5) Filter [codegen id : 2]
Input [2]: [C_CUSTOMER_SK#6300, C_CURRENT_ADDR_SK#6304]
Condition : isnotnull(C_CURRENT_ADDR_SK#6304)

(6) Sort [codegen id : 2]
Input [2]: [C_CUSTOMER_SK#6300, C_CURRENT_ADDR_SK#6304]
Arguments: [c_current_addr_sk#6304 ASC NULLS FIRST], false, 0

(7) SortMergeJoin [codegen id : 3]
Left keys [1]: [ca_address_sk#6287]
Right keys [1]: [c_current_addr_sk#6304]
Join condition: None

(8) Project [codegen id : 3]
Output [2]: [CA_STATE#6295, C_CUSTOMER_SK#6300]
Input [4]: [CA_ADDRESS_SK#6287, CA_STATE#6295, C_CUSTOMER_SK#6300, C_CURRENT_ADDR_SK#6304]

(9) Exchange
Input [2]: [CA_STATE#6295, C_CUSTOMER_SK#6300]
Arguments: hashpartitioning(c_customer_sk#6300, 5), ENSURE_REQUIREMENTS, [id=#2737]

(10) Sort [codegen id : 4]
Input [2]: [CA_STATE#6295, C_CUSTOMER_SK#6300]
Arguments: [c_customer_sk#6300 ASC NULLS FIRST], false, 0

(11) BatchScan
Output [3]: [SS_ITEM_SK#6320, SS_CUSTOMER_SK#6321, SS_SOLD_DATE_SK#6318]
Format: orafile
OraPlan: 00 OraTableScan TPCDS.STORE_SALES, [SS_ITEM_SK#6469, SS_CUSTOMER_SK#6470, SS_SOLD_DATE_SK#6471], [oracolumnref(SS_ITEM_SK#6469), oracolumnref(SS_CUSTOMER_SK#6470), oracolumnref(SS_SOLD_DATE_SK#6471)], orapostfixunaryopexpression(isnotnull(SS_CUSTOMER_SK#6321))
PartitionSchema: struct<SS_SOLD_DATE_SK:decimal(38,18)>
ReadSchema: struct<SS_ITEM_SK:decimal(38,18),SS_CUSTOMER_SK:decimal(38,18)>
dsKey: DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
oraPushdownSQL: select "SS_ITEM_SK", "SS_CUSTOMER_SK", "SS_SOLD_DATE_SK"
from TPCDS.STORE_SALES
where "SS_CUSTOMER_SK" IS NOT NULL and "SS_SOLD_DATE_SK" IS NOT NULL

(12) Filter [codegen id : 5]
Input [3]: [SS_ITEM_SK#6320, SS_CUSTOMER_SK#6321, SS_SOLD_DATE_SK#6318]
Condition : isnotnull(SS_CUSTOMER_SK#6321)

(13) Exchange
Input [3]: [SS_ITEM_SK#6320, SS_CUSTOMER_SK#6321, SS_SOLD_DATE_SK#6318]
Arguments: hashpartitioning(ss_customer_sk#6321, 5), ENSURE_REQUIREMENTS, [id=#2745]

(14) Sort [codegen id : 6]
Input [3]: [SS_ITEM_SK#6320, SS_CUSTOMER_SK#6321, SS_SOLD_DATE_SK#6318]
Arguments: [ss_customer_sk#6321 ASC NULLS FIRST], false, 0

(15) SortMergeJoin [codegen id : 7]
Left keys [1]: [c_customer_sk#6300]
Right keys [1]: [ss_customer_sk#6321]
Join condition: None

(16) Project [codegen id : 7]
Output [3]: [CA_STATE#6295, SS_SOLD_DATE_SK#6318, SS_ITEM_SK#6320]
Input [5]: [CA_STATE#6295, C_CUSTOMER_SK#6300, SS_ITEM_SK#6320, SS_CUSTOMER_SK#6321, SS_SOLD_DATE_SK#6318]

(17) Exchange
Input [3]: [CA_STATE#6295, SS_SOLD_DATE_SK#6318, SS_ITEM_SK#6320]
Arguments: hashpartitioning(ss_sold_date_sk#6318, 5), ENSURE_REQUIREMENTS, [id=#2753]

(18) Sort [codegen id : 8]
Input [3]: [CA_STATE#6295, SS_SOLD_DATE_SK#6318, SS_ITEM_SK#6320]
Arguments: [ss_sold_date_sk#6318 ASC NULLS FIRST], false, 0

(19) BatchScan
Output [2]: [D_DATE_SK#6341, D_MONTH_SEQ#6344]
Format: orafile
OraPlan: 00 OraTableScan TPCDS.DATE_DIM, [D_DATE_SK#6475, D_MONTH_SEQ#6476], [oracolumnref(D_DATE_SK#6475), oracolumnref(D_MONTH_SEQ#6476)], orapostfixunaryopexpression(isnotnull(D_MONTH_SEQ#6344))
PartitionSchema: struct<>
ReadSchema: struct<D_DATE_SK:decimal(38,18),D_MONTH_SEQ:decimal(38,18)>
dsKey: DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
oraPushdownSQL: select "D_DATE_SK", "D_MONTH_SEQ"
from TPCDS.DATE_DIM
where "D_MONTH_SEQ" IS NOT NULL

(20) Filter [codegen id : 9]
Input [2]: [D_DATE_SK#6341, D_MONTH_SEQ#6344]
Condition : (isnotnull(D_MONTH_SEQ#6344) AND (D_MONTH_SEQ#6344 = Subquery scalar-subquery#6283, [id=#2652]))

(21) Project [codegen id : 9]
Output [1]: [D_DATE_SK#6341]
Input [2]: [D_DATE_SK#6341, D_MONTH_SEQ#6344]

(22) Exchange
Input [1]: [D_DATE_SK#6341]
Arguments: hashpartitioning(d_date_sk#6341, 5), ENSURE_REQUIREMENTS, [id=#2762]

(23) Sort [codegen id : 10]
Input [1]: [D_DATE_SK#6341]
Arguments: [d_date_sk#6341 ASC NULLS FIRST], false, 0

(24) SortMergeJoin [codegen id : 11]
Left keys [1]: [ss_sold_date_sk#6318]
Right keys [1]: [d_date_sk#6341]
Join condition: None

(25) Project [codegen id : 11]
Output [2]: [CA_STATE#6295, SS_ITEM_SK#6320]
Input [4]: [CA_STATE#6295, SS_SOLD_DATE_SK#6318, SS_ITEM_SK#6320, D_DATE_SK#6341]

(26) Exchange
Input [2]: [CA_STATE#6295, SS_ITEM_SK#6320]
Arguments: hashpartitioning(ss_item_sk#6320, 5), ENSURE_REQUIREMENTS, [id=#2770]

(27) Sort [codegen id : 12]
Input [2]: [CA_STATE#6295, SS_ITEM_SK#6320]
Arguments: [ss_item_sk#6320 ASC NULLS FIRST], false, 0

(28) BatchScan
Output [3]: [I_ITEM_SK#6369, I_CURRENT_PRICE#6374, I_CATEGORY#6381]
Format: orafile
OraPlan: 00 OraTableScan TPCDS.ITEM, [I_ITEM_SK#6479, I_CURRENT_PRICE#6480, I_CATEGORY#6481], [oracolumnref(I_ITEM_SK#6479), oracolumnref(I_CURRENT_PRICE#6480), oracolumnref(I_CATEGORY#6481)], orapostfixunaryopexpression(isnotnull(I_CURRENT_PRICE#6374))
PartitionSchema: struct<>
ReadSchema: struct<I_ITEM_SK:decimal(38,18),I_CURRENT_PRICE:decimal(38,18),I_CATEGORY:string>
dsKey: DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
oraPushdownSQL: select "I_ITEM_SK", "I_CURRENT_PRICE", "I_CATEGORY"
from TPCDS.ITEM
where "I_CURRENT_PRICE" IS NOT NULL

(29) Filter [codegen id : 13]
Input [3]: [I_ITEM_SK#6369, I_CURRENT_PRICE#6374, I_CATEGORY#6381]
Condition : isnotnull(I_CURRENT_PRICE#6374)

(30) Sort [codegen id : 13]
Input [3]: [I_ITEM_SK#6369, I_CURRENT_PRICE#6374, I_CATEGORY#6381]
Arguments: [i_category#6381 ASC NULLS FIRST], false, 0

(31) BatchScan
Output [2]: [I_CURRENT_PRICE#6426, I_CATEGORY#6433]
Format: orafile
OraPlan: 00 OraTableScan TPCDS.ITEM, [I_CURRENT_PRICE#6457, I_CATEGORY#6458], [oracolumnref(I_CURRENT_PRICE#6457), oracolumnref(I_CATEGORY#6458)], orapostfixunaryopexpression(isnotnull(I_CATEGORY#6433))
PartitionSchema: struct<>
ReadSchema: struct<I_CURRENT_PRICE:decimal(38,18),I_CATEGORY:string>
dsKey: DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
oraPushdownSQL: select "I_CURRENT_PRICE", "I_CATEGORY"
from TPCDS.ITEM
where "I_CATEGORY" IS NOT NULL

(32) Filter [codegen id : 14]
Input [2]: [I_CURRENT_PRICE#6426, I_CATEGORY#6433]
Condition : isnotnull(i_category#6433)

(33) HashAggregate [codegen id : 14]
Input [2]: [I_CURRENT_PRICE#6426, I_CATEGORY#6433]
Keys [1]: [i_category#6433]
Functions [1]: [partial_avg(i_current_price#6426)]
Aggregate Attributes [2]: [sum#6487, count#6488L]
Results [3]: [i_category#6433, sum#6489, count#6490L]

(34) HashAggregate [codegen id : 14]
Input [3]: [i_category#6433, sum#6489, count#6490L]
Keys [1]: [i_category#6433]
Functions [1]: [avg(i_current_price#6426)]
Aggregate Attributes [1]: [avg(i_current_price#6426)#6443]
Results [2]: [avg(i_current_price#6426)#6443 AS avg(i_current_price)#6444, i_category#6433]

(35) Sort [codegen id : 14]
Input [2]: [avg(i_current_price)#6444, i_category#6433]
Arguments: [i_category#6433 ASC NULLS FIRST], false, 0

(36) SortMergeJoin
Left keys [1]: [i_category#6381]
Right keys [1]: [i_category#6433]
Join condition: None

(37) Filter [codegen id : 15]
Input [5]: [I_ITEM_SK#6369, I_CURRENT_PRICE#6374, I_CATEGORY#6381, avg(i_current_price)#6444, i_category#6433]
Condition : (cast(i_current_price#6374 as decimal(38,20)) > CheckOverflow((1.2000000000000000000000 * promote_precision(avg(i_current_price)#6444)), DecimalType(38,20), true))

(38) Project [codegen id : 15]
Output [1]: [I_ITEM_SK#6369]
Input [5]: [I_ITEM_SK#6369, I_CURRENT_PRICE#6374, I_CATEGORY#6381, avg(i_current_price)#6444, i_category#6433]

(39) Exchange
Input [1]: [I_ITEM_SK#6369]
Arguments: hashpartitioning(i_item_sk#6369, 5), ENSURE_REQUIREMENTS, [id=#2790]

(40) Sort [codegen id : 16]
Input [1]: [I_ITEM_SK#6369]
Arguments: [i_item_sk#6369 ASC NULLS FIRST], false, 0

(41) SortMergeJoin [codegen id : 17]
Left keys [1]: [ss_item_sk#6320]
Right keys [1]: [i_item_sk#6369]
Join condition: None

(42) Project [codegen id : 17]
Output [1]: [CA_STATE#6295]
Input [3]: [CA_STATE#6295, SS_ITEM_SK#6320, I_ITEM_SK#6369]

(43) HashAggregate [codegen id : 17]
Input [1]: [CA_STATE#6295]
Keys [1]: [ca_state#6295]
Functions [1]: [partial_count(1)]
Aggregate Attributes [1]: [count#6485L]
Results [2]: [ca_state#6295, count#6486L]

(44) Exchange
Input [2]: [ca_state#6295, count#6486L]
Arguments: hashpartitioning(ca_state#6295, 5), ENSURE_REQUIREMENTS, [id=#2799]

(45) HashAggregate [codegen id : 18]
Input [2]: [ca_state#6295, count#6486L]
Keys [1]: [ca_state#6295]
Functions [1]: [count(1)]
Aggregate Attributes [1]: [count(1)#6391L]
Results [3]: [ca_state#6295 AS state#6285, count(1)#6391L AS cnt#6286L, count(1)#6391L AS count(1)#6446L]

(46) Filter [codegen id : 18]
Input [3]: [state#6285, cnt#6286L, count(1)#6446L]
Condition : (count(1)#6446L >= 10)

(47) Project [codegen id : 18]
Output [2]: [state#6285, cnt#6286L]
Input [3]: [state#6285, cnt#6286L, count(1)#6446L]

(48) TakeOrderedAndProject
Input [2]: [state#6285, cnt#6286L]
Arguments: 100, [cnt#6286L ASC NULLS FIRST], [state#6285, cnt#6286L]

===== Subqueries =====

Subquery:1 Hosting operator id = 20 Hosting Expression = Subquery scalar-subquery#6283, [id=#2652]
* HashAggregate (53)
+- * HashAggregate (52)
   +- * Project (51)
      +- * Filter (50)
         +- BatchScan (49)


(49) BatchScan
Output [3]: [D_MONTH_SEQ#6396, D_YEAR#6399, D_MOY#6401]
Format: orafile
OraPlan: 00 OraTableScan TPCDS.DATE_DIM, [D_MONTH_SEQ#6451, D_YEAR#6452, D_MOY#6453], [oracolumnref(D_MONTH_SEQ#6451), oracolumnref(D_YEAR#6452), oracolumnref(D_MOY#6453)], orabinaryopexpression((((isnotnull(D_YEAR#6399) AND isnotnull(D_MOY#6401)) AND (D_YEAR#6399 = 2001.000000000000000000)) AND (D_MOY#6401 = 1.000000000000000000)))
PartitionSchema: struct<>
ReadSchema: struct<D_MONTH_SEQ:decimal(38,18),D_YEAR:decimal(38,18),D_MOY:decimal(38,18)>
dsKey: DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
oraPushdownBindValues: 2001.000000000000000000, 1.000000000000000000
oraPushdownSQL: select "D_MONTH_SEQ", "D_YEAR", "D_MOY"
from TPCDS.DATE_DIM
where ((("D_YEAR" IS NOT NULL AND "D_MOY" IS NOT NULL) AND ("D_YEAR" = ?)) AND ("D_MOY" = ?))

(50) Filter [codegen id : 1]
Input [3]: [D_MONTH_SEQ#6396, D_YEAR#6399, D_MOY#6401]
Condition : (((isnotnull(D_YEAR#6399) AND isnotnull(D_MOY#6401)) AND (D_YEAR#6399 = 2001.000000000000000000)) AND (D_MOY#6401 = 1.000000000000000000))

(51) Project [codegen id : 1]
Output [1]: [D_MONTH_SEQ#6396]
Input [3]: [D_MONTH_SEQ#6396, D_YEAR#6399, D_MOY#6401]

(52) HashAggregate [codegen id : 1]
Input [1]: [D_MONTH_SEQ#6396]
Keys [1]: [d_month_seq#6396]
Functions: []
Aggregate Attributes: []
Results [1]: [d_month_seq#6396]

(53) HashAggregate [codegen id : 1]
Input [1]: [d_month_seq#6396]
Keys [1]: [d_month_seq#6396]
Functions: []
Aggregate Attributes: []
Results [1]: [d_month_seq#6396]



Query q7

Spark SQL

select  i_item_id,
        avg(ss_quantity) agg1,
        avg(ss_list_price) agg2,
        avg(ss_coupon_amt) agg3,
        avg(ss_sales_price) agg4
 from store_sales, customer_demographics, date_dim, item, promotion
 where ss_sold_date_sk = d_date_sk and
       ss_item_sk = i_item_sk and
       ss_cdemo_sk = cd_demo_sk and
       ss_promo_sk = p_promo_sk and
       cd_gender = 'M' and
       cd_marital_status = 'S' and
       trim(TRAILING from cd_education_status) = 'College' and
       (p_channel_email = 'N' or p_channel_event = 'N') and
       d_year = 2000
 group by i_item_id
 order by i_item_id
  limit 100;
 

Spark Plan with Pushdown turned on

Project (1)
+- BatchScan (2)

(2) BatchScan
Oracle Instance:
   DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
Pushdown Oracle SQL:
select "I_ITEM_ID", "agg1", "agg2", "agg3", "agg4"
from ( select "I_ITEM_ID", AVG("SS_QUANTITY") AS "agg1", AVG("SS_LIST_PRICE") AS "agg2", AVG("SS_COUPON_AMT") AS "agg3", AVG("SS_SALES_PRICE") AS "agg4"
from TPCDS.STORE_SALES  join TPCDS.CUSTOMER_DEMOGRAPHICS  on ("SS_CDEMO_SK" = "CD_DEMO_SK") join TPCDS.DATE_DIM  on ("SS_SOLD_DATE_SK" = "D_DATE_SK") join TPCDS.ITEM  on ("SS_ITEM_SK" = "I_ITEM_SK") join TPCDS.PROMOTION  on ("SS_PROMO_SK" = "P_PROMO_SK")
where ((((("SS_CDEMO_SK" IS NOT NULL AND "SS_PROMO_SK" IS NOT NULL) AND "SS_SOLD_DATE_SK" IS NOT NULL) AND (((((TRIM(TRAILING  FROM "CD_EDUCATION_STATUS") = 'College') AND "CD_GENDER" IS NOT NULL) AND "CD_MARITAL_STATUS" IS NOT NULL) AND ("CD_GENDER" = 'M')) AND ("CD_MARITAL_STATUS" = 'S'))) AND ("D_YEAR" IS NOT NULL AND ("D_YEAR" = 2000.000000000000000000))) AND (("P_CHANNEL_EMAIL" = 'N') OR ("P_CHANNEL_EVENT" = 'N')))
group by "I_ITEM_ID"
order by "I_ITEM_ID" ASC NULLS FIRST ) 
where rownum <= 100
Pushdown Oracle SQL, oracle plan stats estimates:
rowCount = 100, bytes=7000
Pushdown Oracle SQL, Query Splitting details:
Query is not split

Spark Plan with Pushdown turned off

== Physical Plan ==
TakeOrderedAndProject (41)
+- * HashAggregate (40)
   +- Exchange (39)
      +- * HashAggregate (38)
         +- * Project (37)
            +- * SortMergeJoin Inner (36)
               :- * Sort (30)
               :  +- Exchange (29)
               :     +- * Project (28)
               :        +- * SortMergeJoin Inner (27)
               :           :- * Sort (22)
               :           :  +- Exchange (21)
               :           :     +- * Project (20)
               :           :        +- * SortMergeJoin Inner (19)
               :           :           :- * Sort (13)
               :           :           :  +- Exchange (12)
               :           :           :     +- * Project (11)
               :           :           :        +- * SortMergeJoin Inner (10)
               :           :           :           :- * Sort (4)
               :           :           :           :  +- Exchange (3)
               :           :           :           :     +- * Filter (2)
               :           :           :           :        +- BatchScan (1)
               :           :           :           +- * Sort (9)
               :           :           :              +- Exchange (8)
               :           :           :                 +- * Project (7)
               :           :           :                    +- * Filter (6)
               :           :           :                       +- BatchScan (5)
               :           :           +- * Sort (18)
               :           :              +- Exchange (17)
               :           :                 +- * Project (16)
               :           :                    +- * Filter (15)
               :           :                       +- BatchScan (14)
               :           +- * Sort (26)
               :              +- Exchange (25)
               :                 +- * Project (24)
               :                    +- BatchScan (23)
               +- * Sort (35)
                  +- Exchange (34)
                     +- * Project (33)
                        +- * Filter (32)
                           +- BatchScan (31)


(1) BatchScan
Output [8]: [SS_ITEM_SK#6706, SS_CDEMO_SK#6708, SS_PROMO_SK#6712, SS_QUANTITY#6714, SS_LIST_PRICE#6716, SS_SALES_PRICE#6717, SS_COUPON_AMT#6723, SS_SOLD_DATE_SK#6704]
Format: orafile
OraPlan: 00 OraTableScan TPCDS.STORE_SALES, [SS_ITEM_SK#6815, SS_CDEMO_SK#6816, SS_PROMO_SK#6817, SS_QUANTITY#6818, SS_LIST_PRICE#6819, SS_SALES_PRICE#6820, SS_COUPON_AMT#6821, SS_SOLD_DATE_SK#6822], [oracolumnref(SS_ITEM_SK#6815), oracolumnref(SS_CDEMO_SK#6816), oracolumnref(SS_PROMO_SK#6817), oracolumnref(SS_QUANTITY#6818), oracolumnref(SS_LIST_PRICE#6819), oracolumnref(SS_SALES_PRICE#6820), oracolumnref(SS_COUPON_AMT#6821), oracolumnref(SS_SOLD_DATE_SK#6822)], orabinaryopexpression((isnotnull(SS_CDEMO_SK#6708) AND isnotnull(SS_PROMO_SK#6712)))
PartitionSchema: struct<SS_SOLD_DATE_SK:decimal(38,18)>
ReadSchema: struct<SS_ITEM_SK:decimal(38,18),SS_CDEMO_SK:decimal(38,18),SS_PROMO_SK:decimal(38,18),SS_QUANTITY:decimal(38,18),SS_LIST_PRICE:decimal(38,18),SS_SALES_PRICE:decimal(38,18),SS_COUPON_AMT:decimal(38,18)>
dsKey: DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
oraPushdownSQL: select "SS_ITEM_SK", "SS_CDEMO_SK", "SS_PROMO_SK", "SS_QUANTITY", "SS_LIST_PRICE", "SS_SALES_PRICE", "SS_COUPON_AMT", "SS_SOLD_DATE_SK"
from TPCDS.STORE_SALES
where ("SS_CDEMO_SK" IS NOT NULL AND "SS_PROMO_SK" IS NOT NULL) and "SS_SOLD_DATE_SK" IS NOT NULL

(2) Filter [codegen id : 1]
Input [8]: [SS_ITEM_SK#6706, SS_CDEMO_SK#6708, SS_PROMO_SK#6712, SS_QUANTITY#6714, SS_LIST_PRICE#6716, SS_SALES_PRICE#6717, SS_COUPON_AMT#6723, SS_SOLD_DATE_SK#6704]
Condition : (isnotnull(SS_CDEMO_SK#6708) AND isnotnull(SS_PROMO_SK#6712))

(3) Exchange
Input [8]: [SS_ITEM_SK#6706, SS_CDEMO_SK#6708, SS_PROMO_SK#6712, SS_QUANTITY#6714, SS_LIST_PRICE#6716, SS_SALES_PRICE#6717, SS_COUPON_AMT#6723, SS_SOLD_DATE_SK#6704]
Arguments: hashpartitioning(ss_cdemo_sk#6708, 5), ENSURE_REQUIREMENTS, [id=#2941]

(4) Sort [codegen id : 2]
Input [8]: [SS_ITEM_SK#6706, SS_CDEMO_SK#6708, SS_PROMO_SK#6712, SS_QUANTITY#6714, SS_LIST_PRICE#6716, SS_SALES_PRICE#6717, SS_COUPON_AMT#6723, SS_SOLD_DATE_SK#6704]
Arguments: [ss_cdemo_sk#6708 ASC NULLS FIRST], false, 0

(5) BatchScan
Output [4]: [CD_DEMO_SK#6727, CD_GENDER#6728, CD_MARITAL_STATUS#6729, CD_EDUCATION_STATUS#6730]
Format: orafile
OraPlan: 00 OraTableScan TPCDS.CUSTOMER_DEMOGRAPHICS, [CD_DEMO_SK#6831, CD_GENDER#6832, CD_MARITAL_STATUS#6833, CD_EDUCATION_STATUS#6834], [oracolumnref(CD_DEMO_SK#6831), oracolumnref(CD_GENDER#6832), oracolumnref(CD_MARITAL_STATUS#6833), oracolumnref(CD_EDUCATION_STATUS#6834)], orabinaryopexpression((((((rtrim(CD_EDUCATION_STATUS#6730, None) = College) AND isnotnull(CD_GENDER#6728)) AND isnotnull(CD_MARITAL_STATUS#6729)) AND (CD_GENDER#6728 = M)) AND (CD_MARITAL_STATUS#6729 = S)))
PartitionSchema: struct<>
ReadSchema: struct<CD_DEMO_SK:decimal(38,18),CD_GENDER:string,CD_MARITAL_STATUS:string,CD_EDUCATION_STATUS:string>
dsKey: DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
oraPushdownBindValues: College, M, S
oraPushdownSQL: select "CD_DEMO_SK", "CD_GENDER", "CD_MARITAL_STATUS", "CD_EDUCATION_STATUS"
from TPCDS.CUSTOMER_DEMOGRAPHICS
where (((((TRIM(TRAILING  FROM "CD_EDUCATION_STATUS") = ?) AND "CD_GENDER" IS NOT NULL) AND "CD_MARITAL_STATUS" IS NOT NULL) AND ("CD_GENDER" = ?)) AND ("CD_MARITAL_STATUS" = ?))

(6) Filter [codegen id : 3]
Input [4]: [CD_DEMO_SK#6727, CD_GENDER#6728, CD_MARITAL_STATUS#6729, CD_EDUCATION_STATUS#6730]
Condition : (((((rtrim(CD_EDUCATION_STATUS#6730, None) = College) AND isnotnull(CD_GENDER#6728)) AND isnotnull(CD_MARITAL_STATUS#6729)) AND (CD_GENDER#6728 = M)) AND (CD_MARITAL_STATUS#6729 = S))

(7) Project [codegen id : 3]
Output [1]: [CD_DEMO_SK#6727]
Input [4]: [CD_DEMO_SK#6727, CD_GENDER#6728, CD_MARITAL_STATUS#6729, CD_EDUCATION_STATUS#6730]

(8) Exchange
Input [1]: [CD_DEMO_SK#6727]
Arguments: hashpartitioning(cd_demo_sk#6727, 5), ENSURE_REQUIREMENTS, [id=#2950]

(9) Sort [codegen id : 4]
Input [1]: [CD_DEMO_SK#6727]
Arguments: [cd_demo_sk#6727 ASC NULLS FIRST], false, 0

(10) SortMergeJoin [codegen id : 5]
Left keys [1]: [ss_cdemo_sk#6708]
Right keys [1]: [cd_demo_sk#6727]
Join condition: None

(11) Project [codegen id : 5]
Output [7]: [SS_SOLD_DATE_SK#6704, SS_ITEM_SK#6706, SS_PROMO_SK#6712, SS_QUANTITY#6714, SS_LIST_PRICE#6716, SS_SALES_PRICE#6717, SS_COUPON_AMT#6723]
Input [9]: [SS_ITEM_SK#6706, SS_CDEMO_SK#6708, SS_PROMO_SK#6712, SS_QUANTITY#6714, SS_LIST_PRICE#6716, SS_SALES_PRICE#6717, SS_COUPON_AMT#6723, SS_SOLD_DATE_SK#6704, CD_DEMO_SK#6727]

(12) Exchange
Input [7]: [SS_SOLD_DATE_SK#6704, SS_ITEM_SK#6706, SS_PROMO_SK#6712, SS_QUANTITY#6714, SS_LIST_PRICE#6716, SS_SALES_PRICE#6717, SS_COUPON_AMT#6723]
Arguments: hashpartitioning(ss_sold_date_sk#6704, 5), ENSURE_REQUIREMENTS, [id=#2958]

(13) Sort [codegen id : 6]
Input [7]: [SS_SOLD_DATE_SK#6704, SS_ITEM_SK#6706, SS_PROMO_SK#6712, SS_QUANTITY#6714, SS_LIST_PRICE#6716, SS_SALES_PRICE#6717, SS_COUPON_AMT#6723]
Arguments: [ss_sold_date_sk#6704 ASC NULLS FIRST], false, 0

(14) BatchScan
Output [2]: [D_DATE_SK#6736, D_YEAR#6742]
Format: orafile
OraPlan: 00 OraTableScan TPCDS.DATE_DIM, [D_DATE_SK#6839, D_YEAR#6840], [oracolumnref(D_DATE_SK#6839), oracolumnref(D_YEAR#6840)], orabinaryopexpression((isnotnull(D_YEAR#6742) AND (D_YEAR#6742 = 2000.000000000000000000)))
PartitionSchema: struct<>
ReadSchema: struct<D_DATE_SK:decimal(38,18),D_YEAR:decimal(38,18)>
dsKey: DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
oraPushdownBindValues: 2000.000000000000000000
oraPushdownSQL: select "D_DATE_SK", "D_YEAR"
from TPCDS.DATE_DIM
where ("D_YEAR" IS NOT NULL AND ("D_YEAR" = ?))

(15) Filter [codegen id : 7]
Input [2]: [D_DATE_SK#6736, D_YEAR#6742]
Condition : (isnotnull(D_YEAR#6742) AND (D_YEAR#6742 = 2000.000000000000000000))

(16) Project [codegen id : 7]
Output [1]: [D_DATE_SK#6736]
Input [2]: [D_DATE_SK#6736, D_YEAR#6742]

(17) Exchange
Input [1]: [D_DATE_SK#6736]
Arguments: hashpartitioning(d_date_sk#6736, 5), ENSURE_REQUIREMENTS, [id=#2967]

(18) Sort [codegen id : 8]
Input [1]: [D_DATE_SK#6736]
Arguments: [d_date_sk#6736 ASC NULLS FIRST], false, 0

(19) SortMergeJoin [codegen id : 9]
Left keys [1]: [ss_sold_date_sk#6704]
Right keys [1]: [d_date_sk#6736]
Join condition: None

(20) Project [codegen id : 9]
Output [6]: [SS_ITEM_SK#6706, SS_PROMO_SK#6712, SS_QUANTITY#6714, SS_LIST_PRICE#6716, SS_SALES_PRICE#6717, SS_COUPON_AMT#6723]
Input [8]: [SS_SOLD_DATE_SK#6704, SS_ITEM_SK#6706, SS_PROMO_SK#6712, SS_QUANTITY#6714, SS_LIST_PRICE#6716, SS_SALES_PRICE#6717, SS_COUPON_AMT#6723, D_DATE_SK#6736]

(21) Exchange
Input [6]: [SS_ITEM_SK#6706, SS_PROMO_SK#6712, SS_QUANTITY#6714, SS_LIST_PRICE#6716, SS_SALES_PRICE#6717, SS_COUPON_AMT#6723]
Arguments: hashpartitioning(ss_item_sk#6706, 5), ENSURE_REQUIREMENTS, [id=#2975]

(22) Sort [codegen id : 10]
Input [6]: [SS_ITEM_SK#6706, SS_PROMO_SK#6712, SS_QUANTITY#6714, SS_LIST_PRICE#6716, SS_SALES_PRICE#6717, SS_COUPON_AMT#6723]
Arguments: [ss_item_sk#6706 ASC NULLS FIRST], false, 0

(23) BatchScan
Output [2]: [I_ITEM_SK#6764, I_ITEM_ID#6765]
Format: orafile
OraPlan: 00 OraTableScan TPCDS.ITEM, [I_ITEM_SK#6843, I_ITEM_ID#6844], [oracolumnref(I_ITEM_SK#6843), oracolumnref(I_ITEM_ID#6844)]
PartitionSchema: struct<>
ReadSchema: struct<I_ITEM_SK:decimal(38,18),I_ITEM_ID:string>
dsKey: DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
oraPushdownSQL: select "I_ITEM_SK", "I_ITEM_ID"
from TPCDS.ITEM

(24) Project [codegen id : 11]
Output [2]: [I_ITEM_SK#6764, I_ITEM_ID#6765]
Input [2]: [I_ITEM_SK#6764, I_ITEM_ID#6765]

(25) Exchange
Input [2]: [I_ITEM_SK#6764, I_ITEM_ID#6765]
Arguments: hashpartitioning(i_item_sk#6764, 5), ENSURE_REQUIREMENTS, [id=#2983]

(26) Sort [codegen id : 12]
Input [2]: [I_ITEM_SK#6764, I_ITEM_ID#6765]
Arguments: [i_item_sk#6764 ASC NULLS FIRST], false, 0

(27) SortMergeJoin [codegen id : 13]
Left keys [1]: [ss_item_sk#6706]
Right keys [1]: [i_item_sk#6764]
Join condition: None

(28) Project [codegen id : 13]
Output [6]: [SS_PROMO_SK#6712, SS_QUANTITY#6714, SS_LIST_PRICE#6716, SS_SALES_PRICE#6717, SS_COUPON_AMT#6723, I_ITEM_ID#6765]
Input [8]: [SS_ITEM_SK#6706, SS_PROMO_SK#6712, SS_QUANTITY#6714, SS_LIST_PRICE#6716, SS_SALES_PRICE#6717, SS_COUPON_AMT#6723, I_ITEM_SK#6764, I_ITEM_ID#6765]

(29) Exchange
Input [6]: [SS_PROMO_SK#6712, SS_QUANTITY#6714, SS_LIST_PRICE#6716, SS_SALES_PRICE#6717, SS_COUPON_AMT#6723, I_ITEM_ID#6765]
Arguments: hashpartitioning(ss_promo_sk#6712, 5), ENSURE_REQUIREMENTS, [id=#2991]

(30) Sort [codegen id : 14]
Input [6]: [SS_PROMO_SK#6712, SS_QUANTITY#6714, SS_LIST_PRICE#6716, SS_SALES_PRICE#6717, SS_COUPON_AMT#6723, I_ITEM_ID#6765]
Arguments: [ss_promo_sk#6712 ASC NULLS FIRST], false, 0

(31) BatchScan
Output [3]: [P_PROMO_SK#6786, P_CHANNEL_EMAIL#6795, P_CHANNEL_EVENT#6800]
Format: orafile
OraPlan: 00 OraTableScan TPCDS.PROMOTION, [P_PROMO_SK#6847, P_CHANNEL_EMAIL#6848, P_CHANNEL_EVENT#6849], [oracolumnref(P_PROMO_SK#6847), oracolumnref(P_CHANNEL_EMAIL#6848), oracolumnref(P_CHANNEL_EVENT#6849)], orabinaryopexpression(((P_CHANNEL_EMAIL#6795 = N) OR (P_CHANNEL_EVENT#6800 = N)))
PartitionSchema: struct<>
ReadSchema: struct<P_PROMO_SK:decimal(38,18),P_CHANNEL_EMAIL:string,P_CHANNEL_EVENT:string>
dsKey: DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
oraPushdownBindValues: N, N
oraPushdownSQL: select "P_PROMO_SK", "P_CHANNEL_EMAIL", "P_CHANNEL_EVENT"
from TPCDS.PROMOTION
where (("P_CHANNEL_EMAIL" = ?) OR ("P_CHANNEL_EVENT" = ?))

(32) Filter [codegen id : 15]
Input [3]: [P_PROMO_SK#6786, P_CHANNEL_EMAIL#6795, P_CHANNEL_EVENT#6800]
Condition : ((P_CHANNEL_EMAIL#6795 = N) OR (P_CHANNEL_EVENT#6800 = N))

(33) Project [codegen id : 15]
Output [1]: [P_PROMO_SK#6786]
Input [3]: [P_PROMO_SK#6786, P_CHANNEL_EMAIL#6795, P_CHANNEL_EVENT#6800]

(34) Exchange
Input [1]: [P_PROMO_SK#6786]
Arguments: hashpartitioning(p_promo_sk#6786, 5), ENSURE_REQUIREMENTS, [id=#3000]

(35) Sort [codegen id : 16]
Input [1]: [P_PROMO_SK#6786]
Arguments: [p_promo_sk#6786 ASC NULLS FIRST], false, 0

(36) SortMergeJoin [codegen id : 17]
Left keys [1]: [ss_promo_sk#6712]
Right keys [1]: [p_promo_sk#6786]
Join condition: None

(37) Project [codegen id : 17]
Output [5]: [SS_QUANTITY#6714, SS_LIST_PRICE#6716, SS_SALES_PRICE#6717, SS_COUPON_AMT#6723, I_ITEM_ID#6765]
Input [7]: [SS_PROMO_SK#6712, SS_QUANTITY#6714, SS_LIST_PRICE#6716, SS_SALES_PRICE#6717, SS_COUPON_AMT#6723, I_ITEM_ID#6765, P_PROMO_SK#6786]

(38) HashAggregate [codegen id : 17]
Input [5]: [SS_QUANTITY#6714, SS_LIST_PRICE#6716, SS_SALES_PRICE#6717, SS_COUPON_AMT#6723, I_ITEM_ID#6765]
Keys [1]: [i_item_id#6765]
Functions [4]: [partial_avg(ss_quantity#6714), partial_avg(ss_list_price#6716), partial_avg(ss_coupon_amt#6723), partial_avg(ss_sales_price#6717)]
Aggregate Attributes [8]: [sum#6853, count#6854L, sum#6855, count#6856L, sum#6857, count#6858L, sum#6859, count#6860L]
Results [9]: [i_item_id#6765, sum#6861, count#6862L, sum#6863, count#6864L, sum#6865, count#6866L, sum#6867, count#6868L]

(39) Exchange
Input [9]: [i_item_id#6765, sum#6861, count#6862L, sum#6863, count#6864L, sum#6865, count#6866L, sum#6867, count#6868L]
Arguments: hashpartitioning(i_item_id#6765, 5), ENSURE_REQUIREMENTS, [id=#3009]

(40) HashAggregate [codegen id : 18]
Input [9]: [i_item_id#6765, sum#6861, count#6862L, sum#6863, count#6864L, sum#6865, count#6866L, sum#6867, count#6868L]
Keys [1]: [i_item_id#6765]
Functions [4]: [avg(ss_quantity#6714), avg(ss_list_price#6716), avg(ss_coupon_amt#6723), avg(ss_sales_price#6717)]
Aggregate Attributes [4]: [avg(ss_quantity#6714)#6805, avg(ss_list_price#6716)#6806, avg(ss_coupon_amt#6723)#6807, avg(ss_sales_price#6717)#6808]
Results [5]: [i_item_id#6765, avg(ss_quantity#6714)#6805 AS agg1#6700, avg(ss_list_price#6716)#6806 AS agg2#6701, avg(ss_coupon_amt#6723)#6807 AS agg3#6702, avg(ss_sales_price#6717)#6808 AS agg4#6703]

(41) TakeOrderedAndProject
Input [5]: [i_item_id#6765, agg1#6700, agg2#6701, agg3#6702, agg4#6703]
Arguments: 100, [i_item_id#6765 ASC NULLS FIRST], [i_item_id#6765, agg1#6700, agg2#6701, agg3#6702, agg4#6703]


Query q8

Spark SQL

select  s_store_name
      ,sum(ss_net_profit)
 from store_sales
     ,date_dim
     ,store,
     (select ca_zip
     from (
      SELECT substr(ca_zip,1,5) ca_zip
      FROM customer_address
      WHERE substr(ca_zip,1,5) IN (
                          '24128','76232','65084','87816','83926','77556',
                          '20548','26231','43848','15126','91137',
                          '61265','98294','25782','17920','18426',
                          '98235','40081','84093','28577','55565',
                          '17183','54601','67897','22752','86284',
                          '18376','38607','45200','21756','29741',
                          '96765','23932','89360','29839','25989',
                          '28898','91068','72550','10390','18845',
                          '47770','82636','41367','76638','86198',
                          '81312','37126','39192','88424','72175',
                          '81426','53672','10445','42666','66864',
                          '66708','41248','48583','82276','18842',
                          '78890','49448','14089','38122','34425',
                          '79077','19849','43285','39861','66162',
                          '77610','13695','99543','83444','83041',
                          '12305','57665','68341','25003','57834',
                          '62878','49130','81096','18840','27700',
                          '23470','50412','21195','16021','76107',
                          '71954','68309','18119','98359','64544',
                          '10336','86379','27068','39736','98569',
                          '28915','24206','56529','57647','54917',
                          '42961','91110','63981','14922','36420',
                          '23006','67467','32754','30903','20260',
                          '31671','51798','72325','85816','68621',
                          '13955','36446','41766','68806','16725',
                          '15146','22744','35850','88086','51649',
                          '18270','52867','39972','96976','63792',
                          '11376','94898','13595','10516','90225',
                          '58943','39371','94945','28587','96576',
                          '57855','28488','26105','83933','25858',
                          '34322','44438','73171','30122','34102',
                          '22685','71256','78451','54364','13354',
                          '45375','40558','56458','28286','45266',
                          '47305','69399','83921','26233','11101',
                          '15371','69913','35942','15882','25631',
                          '24610','44165','99076','33786','70738',
                          '26653','14328','72305','62496','22152',
                          '10144','64147','48425','14663','21076',
                          '18799','30450','63089','81019','68893',
                          '24996','51200','51211','45692','92712',
                          '70466','79994','22437','25280','38935',
                          '71791','73134','56571','14060','19505',
                          '72425','56575','74351','68786','51650',
                          '20004','18383','76614','11634','18906',
                          '15765','41368','73241','76698','78567',
                          '97189','28545','76231','75691','22246',
                          '51061','90578','56691','68014','51103',
                          '94167','57047','14867','73520','15734',
                          '63435','25733','35474','24676','94627',
                          '53535','17879','15559','53268','59166',
                          '11928','59402','33282','45721','43933',
                          '68101','33515','36634','71286','19736',
                          '58058','55253','67473','41918','19515',
                          '36495','19430','22351','77191','91393',
                          '49156','50298','87501','18652','53179',
                          '18767','63193','23968','65164','68880',
                          '21286','72823','58470','67301','13394',
                          '31016','70372','67030','40604','24317',
                          '45748','39127','26065','77721','31029',
                          '31880','60576','24671','45549','13376',
                          '50016','33123','19769','22927','97789',
                          '46081','72151','15723','46136','51949',
                          '68100','96888','64528','14171','79777',
                          '28709','11489','25103','32213','78668',
                          '22245','15798','27156','37930','62971',
                          '21337','51622','67853','10567','38415',
                          '15455','58263','42029','60279','37125',
                          '56240','88190','50308','26859','64457',
                          '89091','82136','62377','36233','63837',
                          '58078','17043','30010','60099','28810',
                          '98025','29178','87343','73273','30469',
                          '64034','39516','86057','21309','90257',
                          '67875','40162','11356','73650','61810',
                          '72013','30431','22461','19512','13375',
                          '55307','30625','83849','68908','26689',
                          '96451','38193','46820','88885','84935',
                          '69035','83144','47537','56616','94983',
                          '48033','69952','25486','61547','27385',
                          '61860','58048','56910','16807','17871',
                          '35258','31387','35458','35576')
     intersect
      select ca_zip
      from (SELECT substr(ca_zip,1,5) ca_zip,count(*) cnt
            FROM customer_address, customer
            WHERE ca_address_sk = c_current_addr_sk and
                  c_preferred_cust_flag='Y'
            group by ca_zip
            having count(*) > 10)A1)A2) V1
 where ss_store_sk = s_store_sk
  and ss_sold_date_sk = d_date_sk
  and d_qoy = 2 and d_year = 1998
  and (substr(s_zip,1,2) = substr(V1.ca_zip,1,2))
 group by s_store_name
 order by s_store_name
  limit 100;
 

Spark Plan with Pushdown turned on

Project (1)
+- BatchScan (2)

(2) BatchScan
Oracle Instance:
   DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
Pushdown Oracle SQL:
select "S_STORE_NAME", "sum(ss_net_profit)"
from ( select "S_STORE_NAME", SUM("SS_NET_PROFIT") AS "sum(ss_net_profit)"
from TPCDS.STORE_SALES  join TPCDS.DATE_DIM  on ("SS_SOLD_DATE_SK" = "D_DATE_SK") join TPCDS.STORE  on ("SS_STORE_SK" = "S_STORE_SK") join ( select "ca_zip"
from ( select SUBSTR("CA_ZIP" , 1 , 5) AS "ca_zip"
from TPCDS.CUSTOMER_ADDRESS 
where ((SUBSTR("CA_ZIP" , 1 , 5) IN ( '46081', '36634', '18767', '45549', '56571', '68786', '47305', '22752', '16021', '79994', '41918', '47537', '44165', '69913', '43848', '58470', '69035', '22152', '46136', '30903', '10336', '62377', '11928', '18906', '25989', '39371', '97789', '15723', '98294', '88086', '21337', '27068', '91068', '50016', '50298', '13595', '57855', '15146', '21286', '76614', '34425', '72151', '44438', '38607', '53179', '17183', '94945', '81019', '58943', '26653', '88190', '28545', '66708', '51211', '11101', '35850', '18270', '42666', '45266', '67875', '27156', '45721', '30450', '96976', '54917', '18376', '56240', '15371', '81096', '90225', '55253', '83926', '55307', '88424', '22927', '45692', '39972', '69952', '21195', '67853', '79077', '63089', '22744', '65164', '33786', '23932', '96576', '13375', '36420', '16725', '64034', '47770', '15765', '86284', '38193', '94983', '40081', '85816', '78451', '42029', '61547', '71791', '10144', '13354', '37930', '14867', '25103', '51649', '35474', '72013', '58263', '86057', '35258', '17879', '24128', '23470', '20004', '31880', '19505', '98235', '21756', '24317', '22461', '24610', '15882', '54364', '67030', '23968', '73273', '18383', '61265', '72550', '64457', '78668', '83444', '33123', '73520', '39516', '36233', '72325', '62496', '14089', '53535', '31016', '28286', '28577', '10445', '18799', '60279', '18840', '94627', '59166', '12305', '76232', '28898', '78567', '91393', '40162', '49130', '19515', '76107', '74351', '26689', '68908', '75691', '19769', '34322', '28709', '56529', '72175', '26065', '73171', '70372', '45200', '14922', '58078', '77610', '71256', '73134', '70466', '10516', '25858', '98025', '34102', '91110', '10390', '83921', '36446', '11376', '28810', '63435', '64528', '76638', '22245', '30625', '24676', '37125', '17043', '51650', '57047', '53672', '81312', '68100', '89091', '10567', '77191', '41368', '84093', '73241', '62878', '14060', '51798', '62971', '63981', '61860', '56691', '43285', '69399', '61810', '25280', '14171', '31387', '11356', '38935', '15734', '27700', '54601', '22351', '99076', '25486', '59402', '22246', '70738', '68880', '86379', '96888', '18842', '46820', '20260', '37126', '11489', '50308', '11634', '30431', '83933', '33282', '15455', '17920', '72305', '68341', '98569', '38122', '57647', '51622', '26231', '71954', '63193', '68806', '57665', '35576', '24206', '56910', '92712', '13695', '51949', '86198', '25733', '21076', '19736', '65084', '15126', '81426', '49448', '84935', '51200', '56458', '87501', '71286', '97189', '21309', '25003', '68309', '20548', '87343', '14328', '28915', '77721', '19849', '60576', '24996', '30469', '19430', '38415', '67301', '49156', '39127', '28488', '63792', '22685', '82636', '48425', '29178', '14663', '26233', '32754', '72425', '67897', '99543', '27385', '79777', '73650', '43933', '13394', '60099', '41766', '29839', '53268', '78890', '68621', '64544', '51061', '39736', '67467', '52867', '68893', '18119', '26105', '45375', '18426', '31029', '31671', '25782', '45748', '83041', '28587', '88885', '29741', '66162', '35942', '72823', '19512', '36495', '83849', '35458', '17871', '40558', '26859', '41367', '83144', '64147', '91137', '13955', '51103', '76698', '56575', '68014', '96451', '40604', '82136', '23006', '77556', '42961', '18845', '24671', '18652', '25631', '15798', '55565', '87816', '90578', '48033', '39192', '98359', '67473', '56616', '41248', '89360', '58048', '15559', '16807', '76231', '68101', '82276', '63837', '66864', '22437', '33515', '50412', '96765', '13376', '90257', '94167', '32213', '48583', '30122', '39861', '58058', '57834', '94898', '30010' ) AND SUBSTR("CA_ZIP" , 1 , 5) IS NOT NULL) AND  (COALESCE(SUBSTR("CA_ZIP" , 1 , 5) , '<>'), CASE WHEN SUBSTR("CA_ZIP" , 1 , 5) IS NULL THEN 1 ELSE 0 END) IN ( select COALESCE("ca_zip" , '<>'), CASE WHEN "ca_zip" IS NULL THEN 1 ELSE 0 END
from ( select SUBSTR("CA_ZIP" , 1 , 5) AS "ca_zip", COUNT(1) AS "count(1)"
from TPCDS.CUSTOMER_ADDRESS  join TPCDS.CUSTOMER  on ("CA_ADDRESS_SK" = "C_CURRENT_ADDR_SK")
where (("C_PREFERRED_CUST_FLAG" IS NOT NULL AND ("C_PREFERRED_CUST_FLAG" = 'Y')) AND "C_CURRENT_ADDR_SK" IS NOT NULL)
group by "CA_ZIP" ) 
where ("count(1)" > 10) )) ) 
group by "ca_zip" )  on (SUBSTR("S_ZIP" , 1 , 2) = SUBSTR("ca_zip" , 1 , 2))
where ((("SS_STORE_SK" IS NOT NULL AND "SS_SOLD_DATE_SK" IS NOT NULL) AND ((("D_QOY" IS NOT NULL AND "D_YEAR" IS NOT NULL) AND ("D_QOY" = 2.000000000000000000)) AND ("D_YEAR" = 1998.000000000000000000))) AND "S_ZIP" IS NOT NULL)
group by "S_STORE_NAME"
order by "S_STORE_NAME" ASC NULLS FIRST ) 
where rownum <= 100
Pushdown Oracle SQL, oracle plan stats estimates:
rowCount = 8, bytes=320
Pushdown Oracle SQL, Query Splitting details:
Query is not split

Spark Plan with Pushdown turned off

== Physical Plan ==
TakeOrderedAndProject (50)
+- * HashAggregate (49)
   +- Exchange (48)
      +- * HashAggregate (47)
         +- * Project (46)
            +- * SortMergeJoin Inner (45)
               :- * Sort (21)
               :  +- Exchange (20)
               :     +- * Project (19)
               :        +- * SortMergeJoin Inner (18)
               :           :- * Sort (13)
               :           :  +- Exchange (12)
               :           :     +- * Project (11)
               :           :        +- * SortMergeJoin Inner (10)
               :           :           :- * Sort (4)
               :           :           :  +- Exchange (3)
               :           :           :     +- * Filter (2)
               :           :           :        +- BatchScan (1)
               :           :           +- * Sort (9)
               :           :              +- Exchange (8)
               :           :                 +- * Project (7)
               :           :                    +- * Filter (6)
               :           :                       +- BatchScan (5)
               :           +- * Sort (17)
               :              +- Exchange (16)
               :                 +- * Filter (15)
               :                    +- BatchScan (14)
               +- * Sort (44)
                  +- Exchange (43)
                     +- * HashAggregate (42)
                        +- * HashAggregate (41)
                           +- * Project (40)
                              +- SortMergeJoin LeftSemi (39)
                                 :- * Sort (24)
                                 :  +- * Filter (23)
                                 :     +- BatchScan (22)
                                 +- * Sort (38)
                                    +- * Project (37)
                                       +- * Filter (36)
                                          +- * HashAggregate (35)
                                             +- * HashAggregate (34)
                                                +- * Project (33)
                                                   +- * SortMergeJoin Inner (32)
                                                      :- * Sort (27)
                                                      :  +- * Project (26)
                                                      :     +- BatchScan (25)
                                                      +- * Sort (31)
                                                         +- * Project (30)
                                                            +- * Filter (29)
                                                               +- BatchScan (28)


(1) BatchScan
Output [3]: [SS_STORE_SK#7039, SS_NET_PROFIT#7054, SS_SOLD_DATE_SK#7032]
Format: orafile
OraPlan: 00 OraTableScan TPCDS.STORE_SALES, [SS_STORE_SK#7173, SS_NET_PROFIT#7174, SS_SOLD_DATE_SK#7175], [oracolumnref(SS_STORE_SK#7173), oracolumnref(SS_NET_PROFIT#7174), oracolumnref(SS_SOLD_DATE_SK#7175)], orapostfixunaryopexpression(isnotnull(SS_STORE_SK#7039))
PartitionSchema: struct<SS_SOLD_DATE_SK:decimal(38,18)>
ReadSchema: struct<SS_STORE_SK:decimal(38,18),SS_NET_PROFIT:decimal(38,18)>
dsKey: DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
oraPushdownSQL: select "SS_STORE_SK", "SS_NET_PROFIT", "SS_SOLD_DATE_SK"
from TPCDS.STORE_SALES
where "SS_STORE_SK" IS NOT NULL and "SS_SOLD_DATE_SK" IS NOT NULL

(2) Filter [codegen id : 1]
Input [3]: [SS_STORE_SK#7039, SS_NET_PROFIT#7054, SS_SOLD_DATE_SK#7032]
Condition : isnotnull(SS_STORE_SK#7039)

(3) Exchange
Input [3]: [SS_STORE_SK#7039, SS_NET_PROFIT#7054, SS_SOLD_DATE_SK#7032]
Arguments: hashpartitioning(ss_sold_date_sk#7032, 5), ENSURE_REQUIREMENTS, [id=#3198]

(4) Sort [codegen id : 2]
Input [3]: [SS_STORE_SK#7039, SS_NET_PROFIT#7054, SS_SOLD_DATE_SK#7032]
Arguments: [ss_sold_date_sk#7032 ASC NULLS FIRST], false, 0

(5) BatchScan
Output [3]: [D_DATE_SK#7055, D_YEAR#7061, D_QOY#7065]
Format: orafile
OraPlan: 00 OraTableScan TPCDS.DATE_DIM, [D_DATE_SK#7179, D_YEAR#7180, D_QOY#7181], [oracolumnref(D_DATE_SK#7179), oracolumnref(D_YEAR#7180), oracolumnref(D_QOY#7181)], orabinaryopexpression((((isnotnull(D_QOY#7065) AND isnotnull(D_YEAR#7061)) AND (D_QOY#7065 = 2.000000000000000000)) AND (D_YEAR#7061 = 1998.000000000000000000)))
PartitionSchema: struct<>
ReadSchema: struct<D_DATE_SK:decimal(38,18),D_YEAR:decimal(38,18),D_QOY:decimal(38,18)>
dsKey: DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
oraPushdownBindValues: 2.000000000000000000, 1998.000000000000000000
oraPushdownSQL: select "D_DATE_SK", "D_YEAR", "D_QOY"
from TPCDS.DATE_DIM
where ((("D_QOY" IS NOT NULL AND "D_YEAR" IS NOT NULL) AND ("D_QOY" = ?)) AND ("D_YEAR" = ?))

(6) Filter [codegen id : 3]
Input [3]: [D_DATE_SK#7055, D_YEAR#7061, D_QOY#7065]
Condition : (((isnotnull(D_QOY#7065) AND isnotnull(D_YEAR#7061)) AND (D_QOY#7065 = 2.000000000000000000)) AND (D_YEAR#7061 = 1998.000000000000000000))

(7) Project [codegen id : 3]
Output [1]: [D_DATE_SK#7055]
Input [3]: [D_DATE_SK#7055, D_YEAR#7061, D_QOY#7065]

(8) Exchange
Input [1]: [D_DATE_SK#7055]
Arguments: hashpartitioning(d_date_sk#7055, 5), ENSURE_REQUIREMENTS, [id=#3207]

(9) Sort [codegen id : 4]
Input [1]: [D_DATE_SK#7055]
Arguments: [d_date_sk#7055 ASC NULLS FIRST], false, 0

(10) SortMergeJoin [codegen id : 5]
Left keys [1]: [ss_sold_date_sk#7032]
Right keys [1]: [d_date_sk#7055]
Join condition: None

(11) Project [codegen id : 5]
Output [2]: [SS_STORE_SK#7039, SS_NET_PROFIT#7054]
Input [4]: [SS_STORE_SK#7039, SS_NET_PROFIT#7054, SS_SOLD_DATE_SK#7032, D_DATE_SK#7055]

(12) Exchange
Input [2]: [SS_STORE_SK#7039, SS_NET_PROFIT#7054]
Arguments: hashpartitioning(ss_store_sk#7039, 5), ENSURE_REQUIREMENTS, [id=#3215]

(13) Sort [codegen id : 6]
Input [2]: [SS_STORE_SK#7039, SS_NET_PROFIT#7054]
Arguments: [ss_store_sk#7039 ASC NULLS FIRST], false, 0

(14) BatchScan
Output [3]: [S_STORE_SK#7083, S_STORE_NAME#7088, S_ZIP#7108]
Format: orafile
OraPlan: 00 OraTableScan TPCDS.STORE, [S_STORE_SK#7185, S_STORE_NAME#7186, S_ZIP#7187], [oracolumnref(S_STORE_SK#7185), oracolumnref(S_STORE_NAME#7186), oracolumnref(S_ZIP#7187)], orapostfixunaryopexpression(isnotnull(S_ZIP#7108))
PartitionSchema: struct<>
ReadSchema: struct<S_STORE_SK:decimal(38,18),S_STORE_NAME:string,S_ZIP:string>
dsKey: DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
oraPushdownSQL: select "S_STORE_SK", "S_STORE_NAME", "S_ZIP"
from TPCDS.STORE
where "S_ZIP" IS NOT NULL

(15) Filter [codegen id : 7]
Input [3]: [S_STORE_SK#7083, S_STORE_NAME#7088, S_ZIP#7108]
Condition : isnotnull(S_ZIP#7108)

(16) Exchange
Input [3]: [S_STORE_SK#7083, S_STORE_NAME#7088, S_ZIP#7108]
Arguments: hashpartitioning(s_store_sk#7083, 5), ENSURE_REQUIREMENTS, [id=#3223]

(17) Sort [codegen id : 8]
Input [3]: [S_STORE_SK#7083, S_STORE_NAME#7088, S_ZIP#7108]
Arguments: [s_store_sk#7083 ASC NULLS FIRST], false, 0

(18) SortMergeJoin [codegen id : 9]
Left keys [1]: [ss_store_sk#7039]
Right keys [1]: [s_store_sk#7083]
Join condition: None

(19) Project [codegen id : 9]
Output [3]: [SS_NET_PROFIT#7054, S_STORE_NAME#7088, S_ZIP#7108]
Input [5]: [SS_STORE_SK#7039, SS_NET_PROFIT#7054, S_STORE_SK#7083, S_STORE_NAME#7088, S_ZIP#7108]

(20) Exchange
Input [3]: [SS_NET_PROFIT#7054, S_STORE_NAME#7088, S_ZIP#7108]
Arguments: hashpartitioning(substr(s_zip#7108, 1, 2), 5), ENSURE_REQUIREMENTS, [id=#3231]

(21) Sort [codegen id : 10]
Input [3]: [SS_NET_PROFIT#7054, S_STORE_NAME#7088, S_ZIP#7108]
Arguments: [substr(s_zip#7108, 1, 2) ASC NULLS FIRST], false, 0

(22) BatchScan
Output [1]: [CA_ZIP#7121]
Format: orafile
OraPlan: 00 OraTableScan TPCDS.CUSTOMER_ADDRESS, [CA_ZIP#7191], [oracolumnref(CA_ZIP#7191)], orabinaryopexpression((substr(CA_ZIP#7121, 1, 5) INSET (56910,69952,63792,39371,74351,11101,25003,97189,57834,73134,62377,51200,32754,22752,86379,14171,91110,40162,98569,28709,13394,66162,25733,25782,26065,18383,51949,87343,50298,83849,33786,64528,23470,67030,46136,25280,46820,77721,99076,18426,31880,17871,98235,45748,49156,18652,72013,51622,43848,78567,41248,13695,44165,67853,54917,53179,64034,10567,71791,68908,55565,59402,64147,85816,57855,61547,27700,68100,28810,58263,15723,83933,51103,58058,90578,82276,81096,81426,96451,77556,38607,76638,18906,62971,57047,48425,35576,11928,30625,83444,73520,51650,57647,60099,30122,94983,24128,10445,41368,26233,26859,21756,24676,19849,36420,38193,58470,39127,13595,87501,24317,15455,69399,98025,81019,48033,11376,39516,67875,92712,14867,38122,29741,42961,30469,51211,56458,15559,16021,33123,33282,33515,72823,54601,76698,56240,72175,60279,20004,68806,72325,28488,43933,50412,45200,22246,78668,79777,96765,67301,73273,49448,82636,23932,47305,29839,39192,18799,61265,37125,58943,64457,88424,24610,84935,89360,68893,30431,28898,10336,90257,59166,46081,26105,96888,36634,86284,35258,39972,22927,73241,53268,24206,27385,99543,31671,14663,30903,39861,24996,63089,88086,83921,21076,67897,66708,45721,60576,25103,52867,30450,36233,30010,96576,73171,56571,56575,64544,13955,78451,43285,18119,16725,83041,76107,79994,54364,35942,56691,19769,63435,34102,18845,22744,13354,75691,45549,23968,31387,83144,13375,15765,28577,88190,19736,73650,37930,25989,83926,94898,51798,39736,22437,55253,38415,71256,18376,42029,25858,44438,19515,38935,51649,71954,15882,18767,63193,25486,49130,37126,40604,34425,17043,12305,11634,26653,94167,36446,10516,67473,66864,72425,63981,18842,22461,42666,47770,69035,70372,28587,45266,15371,15798,45375,90225,16807,31016,68014,21337,19505,50016,10144,84093,21286,19430,34322,91068,94945,72305,24671,58048,65084,28545,21195,20548,22245,77191,96976,48583,76231,15734,61810,11356,68621,68786,98359,41367,26689,69913,76614,68101,88885,50308,79077,18270,28915,29178,53672,62878,10390,14922,68341,56529,41766,68309,56616,15126,61860,97789,11489,45692,41918,72151,72550,27156,36495,70738,17879,53535,17920,68880,78890,35850,14089,58078,65164,27068,26231,13376,57665,32213,77610,87816,21309,15146,86198,91137,55307,67467,40558,94627,82136,22351,89091,20260,23006,91393,47537,62496,98294,18840,71286,81312,31029,70466,35458,14060,22685,28286,25631,19512,40081,63837,14328,35474,22152,76232,51061,86057,17183) AND isnotnull(substr(CA_ZIP#7121, 1, 5))))
PartitionSchema: struct<>
ReadSchema: struct<CA_ZIP:string>
dsKey: DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
oraPushdownBindValues: 1, 5, 46081, 36634, 18767, 45549, 56571, 68786, 47305, 22752, 16021, 79994, 41918, 47537, 44165, 69913, 43848, 58470, 69035, 22152, 46136, 30903, 10336, 62377, 11928, 18906, 25989, 39371, 97789, 15723, 98294, 88086, 21337, 27068, 91068, 50016, 50298, 13595, 57855, 15146, 21286, 76614, 34425, 72151, 44438, 38607, 53179, 17183, 94945, 81019, 58943, 26653, 88190, 28545, 66708, 51211, 11101, 35850, 18270, 42666, 45266, 67875, 27156, 45721, 30450, 96976, 54917, 18376, 56240, 15371, 81096, 90225, 55253, 83926, 55307, 88424, 22927, 45692, 39972, 69952, 21195, 67853, 79077, 63089, 22744, 65164, 33786, 23932, 96576, 13375, 36420, 16725, 64034, 47770, 15765, 86284, 38193, 94983, 40081, 85816, 78451, 42029, 61547, 71791, 10144, 13354, 37930, 14867, 25103, 51649, 35474, 72013, 58263, 86057, 35258, 17879, 24128, 23470, 20004, 31880, 19505, 98235, 21756, 24317, 22461, 24610, 15882, 54364, 67030, 23968, 73273, 18383, 61265, 72550, 64457, 78668, 83444, 33123, 73520, 39516, 36233, 72325, 62496, 14089, 53535, 31016, 28286, 28577, 10445, 18799, 60279, 18840, 94627, 59166, 12305, 76232, 28898, 78567, 91393, 40162, 49130, 19515, 76107, 74351, 26689, 68908, 75691, 19769, 34322, 28709, 56529, 72175, 26065, 73171, 70372, 45200, 14922, 58078, 77610, 71256, 73134, 70466, 10516, 25858, 98025, 34102, 91110, 10390, 83921, 36446, 11376, 28810, 63435, 64528, 76638, 22245, 30625, 24676, 37125, 17043, 51650, 57047, 53672, 81312, 68100, 89091, 10567, 77191, 41368, 84093, 73241, 62878, 14060, 51798, 62971, 63981, 61860, 56691, 43285, 69399, 61810, 25280, 14171, 31387, 11356, 38935, 15734, 27700, 54601, 22351, 99076, 25486, 59402, 22246, 70738, 68880, 86379, 96888, 18842, 46820, 20260, 37126, 11489, 50308, 11634, 30431, 83933, 33282, 15455, 17920, 72305, 68341, 98569, 38122, 57647, 51622, 26231, 71954, 63193, 68806, 57665, 35576, 24206, 56910, 92712, 13695, 51949, 86198, 25733, 21076, 19736, 65084, 15126, 81426, 49448, 84935, 51200, 56458, 87501, 71286, 97189, 21309, 25003, 68309, 20548, 87343, 14328, 28915, 77721, 19849, 60576, 24996, 30469, 19430, 38415, 67301, 49156, 39127, 28488, 63792, 22685, 82636, 48425, 29178, 14663, 26233, 32754, 72425, 67897, 99543, 27385, 79777, 73650, 43933, 13394, 60099, 41766, 29839, 53268, 78890, 68621, 64544, 51061, 39736, 67467, 52867, 68893, 18119, 26105, 45375, 18426, 31029, 31671, 25782, 45748, 83041, 28587, 88885, 29741, 66162, 35942, 72823, 19512, 36495, 83849, 35458, 17871, 40558, 26859, 41367, 83144, 64147, 91137, 13955, 51103, 76698, 56575, 68014, 96451, 40604, 82136, 23006, 77556, 42961, 18845, 24671, 18652, 25631, 15798, 55565, 87816, 90578, 48033, 39192, 98359, 67473, 56616, 41248, 89360, 58048, 15559, 16807, 76231, 68101, 82276, 63837, 66864, 22437, 33515, 50412, 96765, 13376, 90257, 94167, 32213, 48583, 30122, 39861, 58058, 57834, 94898, 30010, 1, 5
oraPushdownSQL: select "CA_ZIP"
from TPCDS.CUSTOMER_ADDRESS
where (SUBSTR("CA_ZIP" , ? , ?) IN ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? ) AND SUBSTR("CA_ZIP" , ? , ?) IS NOT NULL)

(23) Filter [codegen id : 11]
Input [1]: [CA_ZIP#7121]
Condition : (substr(CA_ZIP#7121, 1, 5) INSET (56910,69952,63792,39371,74351,11101,25003,97189,57834,73134,62377,51200,32754,22752,86379,14171,91110,40162,98569,28709,13394,66162,25733,25782,26065,18383,51949,87343,50298,83849,33786,64528,23470,67030,46136,25280,46820,77721,99076,18426,31880,17871,98235,45748,49156,18652,72013,51622,43848,78567,41248,13695,44165,67853,54917,53179,64034,10567,71791,68908,55565,59402,64147,85816,57855,61547,27700,68100,28810,58263,15723,83933,51103,58058,90578,82276,81096,81426,96451,77556,38607,76638,18906,62971,57047,48425,35576,11928,30625,83444,73520,51650,57647,60099,30122,94983,24128,10445,41368,26233,26859,21756,24676,19849,36420,38193,58470,39127,13595,87501,24317,15455,69399,98025,81019,48033,11376,39516,67875,92712,14867,38122,29741,42961,30469,51211,56458,15559,16021,33123,33282,33515,72823,54601,76698,56240,72175,60279,20004,68806,72325,28488,43933,50412,45200,22246,78668,79777,96765,67301,73273,49448,82636,23932,47305,29839,39192,18799,61265,37125,58943,64457,88424,24610,84935,89360,68893,30431,28898,10336,90257,59166,46081,26105,96888,36634,86284,35258,39972,22927,73241,53268,24206,27385,99543,31671,14663,30903,39861,24996,63089,88086,83921,21076,67897,66708,45721,60576,25103,52867,30450,36233,30010,96576,73171,56571,56575,64544,13955,78451,43285,18119,16725,83041,76107,79994,54364,35942,56691,19769,63435,34102,18845,22744,13354,75691,45549,23968,31387,83144,13375,15765,28577,88190,19736,73650,37930,25989,83926,94898,51798,39736,22437,55253,38415,71256,18376,42029,25858,44438,19515,38935,51649,71954,15882,18767,63193,25486,49130,37126,40604,34425,17043,12305,11634,26653,94167,36446,10516,67473,66864,72425,63981,18842,22461,42666,47770,69035,70372,28587,45266,15371,15798,45375,90225,16807,31016,68014,21337,19505,50016,10144,84093,21286,19430,34322,91068,94945,72305,24671,58048,65084,28545,21195,20548,22245,77191,96976,48583,76231,15734,61810,11356,68621,68786,98359,41367,26689,69913,76614,68101,88885,50308,79077,18270,28915,29178,53672,62878,10390,14922,68341,56529,41766,68309,56616,15126,61860,97789,11489,45692,41918,72151,72550,27156,36495,70738,17879,53535,17920,68880,78890,35850,14089,58078,65164,27068,26231,13376,57665,32213,77610,87816,21309,15146,86198,91137,55307,67467,40558,94627,82136,22351,89091,20260,23006,91393,47537,62496,98294,18840,71286,81312,31029,70466,35458,14060,22685,28286,25631,19512,40081,63837,14328,35474,22152,76232,51061,86057,17183) AND isnotnull(substr(CA_ZIP#7121, 1, 5)))

(24) Sort [codegen id : 11]
Input [1]: [CA_ZIP#7121]
Arguments: [coalesce(substr(ca_zip#7121, 1, 5), ) ASC NULLS FIRST, isnull(substr(ca_zip#7121, 1, 5)) ASC NULLS FIRST], false, 0

(25) BatchScan
Output [2]: [CA_ADDRESS_SK#7125, CA_ZIP#7134]
Format: orafile
OraPlan: 00 OraTableScan TPCDS.CUSTOMER_ADDRESS, [CA_ADDRESS_SK#7193, CA_ZIP#7194], [oracolumnref(CA_ADDRESS_SK#7193), oracolumnref(CA_ZIP#7194)]
PartitionSchema: struct<>
ReadSchema: struct<CA_ADDRESS_SK:decimal(38,18),CA_ZIP:string>
dsKey: DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
oraPushdownSQL: select "CA_ADDRESS_SK", "CA_ZIP"
from TPCDS.CUSTOMER_ADDRESS

(26) Project [codegen id : 12]
Output [2]: [CA_ADDRESS_SK#7125, CA_ZIP#7134]
Input [2]: [CA_ADDRESS_SK#7125, CA_ZIP#7134]

(27) Sort [codegen id : 12]
Input [2]: [CA_ADDRESS_SK#7125, CA_ZIP#7134]
Arguments: [ca_address_sk#7125 ASC NULLS FIRST], false, 0

(28) BatchScan
Output [2]: [C_CURRENT_ADDR_SK#7142, C_PREFERRED_CUST_FLAG#7148]
Format: orafile
OraPlan: 00 OraTableScan TPCDS.CUSTOMER, [C_CURRENT_ADDR_SK#7197, C_PREFERRED_CUST_FLAG#7198], [oracolumnref(C_CURRENT_ADDR_SK#7197), oracolumnref(C_PREFERRED_CUST_FLAG#7198)], orabinaryopexpression(((isnotnull(C_PREFERRED_CUST_FLAG#7148) AND (C_PREFERRED_CUST_FLAG#7148 = Y)) AND isnotnull(C_CURRENT_ADDR_SK#7142)))
PartitionSchema: struct<>
ReadSchema: struct<C_CURRENT_ADDR_SK:decimal(38,18),C_PREFERRED_CUST_FLAG:string>
dsKey: DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
oraPushdownBindValues: Y
oraPushdownSQL: select "C_CURRENT_ADDR_SK", "C_PREFERRED_CUST_FLAG"
from TPCDS.CUSTOMER
where (("C_PREFERRED_CUST_FLAG" IS NOT NULL AND ("C_PREFERRED_CUST_FLAG" = ?)) AND "C_CURRENT_ADDR_SK" IS NOT NULL)

(29) Filter [codegen id : 13]
Input [2]: [C_CURRENT_ADDR_SK#7142, C_PREFERRED_CUST_FLAG#7148]
Condition : ((isnotnull(C_PREFERRED_CUST_FLAG#7148) AND (C_PREFERRED_CUST_FLAG#7148 = Y)) AND isnotnull(C_CURRENT_ADDR_SK#7142))

(30) Project [codegen id : 13]
Output [1]: [C_CURRENT_ADDR_SK#7142]
Input [2]: [C_CURRENT_ADDR_SK#7142, C_PREFERRED_CUST_FLAG#7148]

(31) Sort [codegen id : 13]
Input [1]: [C_CURRENT_ADDR_SK#7142]
Arguments: [c_current_addr_sk#7142 ASC NULLS FIRST], false, 0

(32) SortMergeJoin [codegen id : 14]
Left keys [1]: [ca_address_sk#7125]
Right keys [1]: [c_current_addr_sk#7142]
Join condition: None

(33) Project [codegen id : 14]
Output [1]: [CA_ZIP#7134]
Input [3]: [CA_ADDRESS_SK#7125, CA_ZIP#7134, C_CURRENT_ADDR_SK#7142]

(34) HashAggregate [codegen id : 14]
Input [1]: [CA_ZIP#7134]
Keys [1]: [ca_zip#7134]
Functions [1]: [partial_count(1)]
Aggregate Attributes [1]: [count#7205L]
Results [2]: [ca_zip#7134, count#7206L]

(35) HashAggregate [codegen id : 14]
Input [2]: [ca_zip#7134, count#7206L]
Keys [1]: [ca_zip#7134]
Functions [1]: [count(1)]
Aggregate Attributes [1]: [count(1)#7157L]
Results [2]: [substr(ca_zip#7134, 1, 5) AS ca_zip#7030, count(1)#7157L AS count(1)#7159L]

(36) Filter [codegen id : 14]
Input [2]: [ca_zip#7030, count(1)#7159L]
Condition : (count(1)#7159L > 10)

(37) Project [codegen id : 14]
Output [1]: [ca_zip#7030]
Input [2]: [ca_zip#7030, count(1)#7159L]

(38) Sort [codegen id : 14]
Input [1]: [ca_zip#7030]
Arguments: [coalesce(ca_zip#7030, ) ASC NULLS FIRST, isnull(ca_zip#7030) ASC NULLS FIRST], false, 0

(39) SortMergeJoin
Left keys [2]: [coalesce(substr(ca_zip#7121, 1, 5), ), isnull(substr(ca_zip#7121, 1, 5))]
Right keys [2]: [coalesce(ca_zip#7030, ), isnull(ca_zip#7030)]
Join condition: None

(40) Project [codegen id : 15]
Output [1]: [substr(ca_zip#7121, 1, 5) AS ca_zip#7029]
Input [1]: [CA_ZIP#7121]

(41) HashAggregate [codegen id : 15]
Input [1]: [ca_zip#7029]
Keys [1]: [ca_zip#7029]
Functions: []
Aggregate Attributes: []
Results [1]: [ca_zip#7029]

(42) HashAggregate [codegen id : 15]
Input [1]: [ca_zip#7029]
Keys [1]: [ca_zip#7029]
Functions: []
Aggregate Attributes: []
Results [1]: [ca_zip#7029]

(43) Exchange
Input [1]: [ca_zip#7029]
Arguments: hashpartitioning(substr(ca_zip#7029, 1, 2), 5), ENSURE_REQUIREMENTS, [id=#3265]

(44) Sort [codegen id : 16]
Input [1]: [ca_zip#7029]
Arguments: [substr(ca_zip#7029, 1, 2) ASC NULLS FIRST], false, 0

(45) SortMergeJoin [codegen id : 17]
Left keys [1]: [substr(s_zip#7108, 1, 2)]
Right keys [1]: [substr(ca_zip#7029, 1, 2)]
Join condition: None

(46) Project [codegen id : 17]
Output [2]: [SS_NET_PROFIT#7054, S_STORE_NAME#7088]
Input [4]: [SS_NET_PROFIT#7054, S_STORE_NAME#7088, S_ZIP#7108, ca_zip#7029]

(47) HashAggregate [codegen id : 17]
Input [2]: [SS_NET_PROFIT#7054, S_STORE_NAME#7088]
Keys [1]: [s_store_name#7088]
Functions [1]: [partial_sum(ss_net_profit#7054)]
Aggregate Attributes [2]: [sum#7201, isEmpty#7202]
Results [3]: [s_store_name#7088, sum#7203, isEmpty#7204]

(48) Exchange
Input [3]: [s_store_name#7088, sum#7203, isEmpty#7204]
Arguments: hashpartitioning(s_store_name#7088, 5), ENSURE_REQUIREMENTS, [id=#3274]

(49) HashAggregate [codegen id : 18]
Input [3]: [s_store_name#7088, sum#7203, isEmpty#7204]
Keys [1]: [s_store_name#7088]
Functions [1]: [sum(ss_net_profit#7054)]
Aggregate Attributes [1]: [sum(ss_net_profit#7054)#7163]
Results [2]: [s_store_name#7088, sum(ss_net_profit#7054)#7163 AS sum(ss_net_profit)#7164]

(50) TakeOrderedAndProject
Input [2]: [s_store_name#7088, sum(ss_net_profit)#7164]
Arguments: 100, [s_store_name#7088 ASC NULLS FIRST], [s_store_name#7088, sum(ss_net_profit)#7164]


Query q9

Spark SQL

select case when (select count(*)
                  from store_sales
                  where ss_quantity between 1 and 20) > 74129
            then (select avg(ss_ext_discount_amt)
                  from store_sales
                  where ss_quantity between 1 and 20)
            else (select avg(ss_net_paid)
                  from store_sales
                  where ss_quantity between 1 and 20) end bucket1 ,
       case when (select count(*)
                  from store_sales
                  where ss_quantity between 21 and 40) > 122840
            then (select avg(ss_ext_discount_amt)
                  from store_sales
                  where ss_quantity between 21 and 40)
            else (select avg(ss_net_paid)
                  from store_sales
                  where ss_quantity between 21 and 40) end bucket2,
       case when (select count(*)
                  from store_sales
                  where ss_quantity between 41 and 60) > 56580
            then (select avg(ss_ext_discount_amt)
                  from store_sales
                  where ss_quantity between 41 and 60)
            else (select avg(ss_net_paid)
                  from store_sales
                  where ss_quantity between 41 and 60) end bucket3,
       case when (select count(*)
                  from store_sales
                  where ss_quantity between 61 and 80) > 10097
            then (select avg(ss_ext_discount_amt)
                  from store_sales
                  where ss_quantity between 61 and 80)
            else (select avg(ss_net_paid)
                  from store_sales
                  where ss_quantity between 61 and 80) end bucket4,
       case when (select count(*)
                  from store_sales
                  where ss_quantity between 81 and 100) > 165306
            then (select avg(ss_ext_discount_amt)
                  from store_sales
                  where ss_quantity between 81 and 100)
            else (select avg(ss_net_paid)
                  from store_sales
                  where ss_quantity between 81 and 100) end bucket5
from reason
where r_reason_sk = 1
 

Spark Plan with Pushdown turned on

Project (1)
+- BatchScan (2)

(2) BatchScan
Oracle Instance:
   DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
Pushdown Oracle SQL:
select CASE WHEN ( ( select COUNT(1) AS "count(1)"
from TPCDS.STORE_SALES 
where (("SS_QUANTITY" IS NOT NULL AND ("SS_QUANTITY" >= 1.000000000000000000)) AND ("SS_QUANTITY" <= 20.000000000000000000)) ) > 74129) THEN  ( select AVG("SS_EXT_DISCOUNT_AMT") AS "avg(ss_ext_discount_amt)"
from TPCDS.STORE_SALES 
where (("SS_QUANTITY" IS NOT NULL AND ("SS_QUANTITY" >= 1.000000000000000000)) AND ("SS_QUANTITY" <= 20.000000000000000000)) ) ELSE  ( select AVG("SS_NET_PAID") AS "avg(ss_net_paid)"
from TPCDS.STORE_SALES 
where (("SS_QUANTITY" IS NOT NULL AND ("SS_QUANTITY" >= 1.000000000000000000)) AND ("SS_QUANTITY" <= 20.000000000000000000)) ) END AS "bucket1", CASE WHEN ( ( select COUNT(1) AS "count(1)"
from TPCDS.STORE_SALES 
where (("SS_QUANTITY" IS NOT NULL AND ("SS_QUANTITY" >= 21.000000000000000000)) AND ("SS_QUANTITY" <= 40.000000000000000000)) ) > 122840) THEN  ( select AVG("SS_EXT_DISCOUNT_AMT") AS "avg(ss_ext_discount_amt)"
from TPCDS.STORE_SALES 
where (("SS_QUANTITY" IS NOT NULL AND ("SS_QUANTITY" >= 21.000000000000000000)) AND ("SS_QUANTITY" <= 40.000000000000000000)) ) ELSE  ( select AVG("SS_NET_PAID") AS "avg(ss_net_paid)"
from TPCDS.STORE_SALES 
where (("SS_QUANTITY" IS NOT NULL AND ("SS_QUANTITY" >= 21.000000000000000000)) AND ("SS_QUANTITY" <= 40.000000000000000000)) ) END AS "bucket2", CASE WHEN ( ( select COUNT(1) AS "count(1)"
from TPCDS.STORE_SALES 
where (("SS_QUANTITY" IS NOT NULL AND ("SS_QUANTITY" >= 41.000000000000000000)) AND ("SS_QUANTITY" <= 60.000000000000000000)) ) > 56580) THEN  ( select AVG("SS_EXT_DISCOUNT_AMT") AS "avg(ss_ext_discount_amt)"
from TPCDS.STORE_SALES 
where (("SS_QUANTITY" IS NOT NULL AND ("SS_QUANTITY" >= 41.000000000000000000)) AND ("SS_QUANTITY" <= 60.000000000000000000)) ) ELSE  ( select AVG("SS_NET_PAID") AS "avg(ss_net_paid)"
from TPCDS.STORE_SALES 
where (("SS_QUANTITY" IS NOT NULL AND ("SS_QUANTITY" >= 41.000000000000000000)) AND ("SS_QUANTITY" <= 60.000000000000000000)) ) END AS "bucket3", CASE WHEN ( ( select COUNT(1) AS "count(1)"
from TPCDS.STORE_SALES 
where (("SS_QUANTITY" IS NOT NULL AND ("SS_QUANTITY" >= 61.000000000000000000)) AND ("SS_QUANTITY" <= 80.000000000000000000)) ) > 10097) THEN  ( select AVG("SS_EXT_DISCOUNT_AMT") AS "avg(ss_ext_discount_amt)"
from TPCDS.STORE_SALES 
where (("SS_QUANTITY" IS NOT NULL AND ("SS_QUANTITY" >= 61.000000000000000000)) AND ("SS_QUANTITY" <= 80.000000000000000000)) ) ELSE  ( select AVG("SS_NET_PAID") AS "avg(ss_net_paid)"
from TPCDS.STORE_SALES 
where (("SS_QUANTITY" IS NOT NULL AND ("SS_QUANTITY" >= 61.000000000000000000)) AND ("SS_QUANTITY" <= 80.000000000000000000)) ) END AS "bucket4", CASE WHEN ( ( select COUNT(1) AS "count(1)"
from TPCDS.STORE_SALES 
where (("SS_QUANTITY" IS NOT NULL AND ("SS_QUANTITY" >= 81.000000000000000000)) AND ("SS_QUANTITY" <= 100.000000000000000000)) ) > 165306) THEN  ( select AVG("SS_EXT_DISCOUNT_AMT") AS "avg(ss_ext_discount_amt)"
from TPCDS.STORE_SALES 
where (("SS_QUANTITY" IS NOT NULL AND ("SS_QUANTITY" >= 81.000000000000000000)) AND ("SS_QUANTITY" <= 100.000000000000000000)) ) ELSE  ( select AVG("SS_NET_PAID") AS "avg(ss_net_paid)"
from TPCDS.STORE_SALES 
where (("SS_QUANTITY" IS NOT NULL AND ("SS_QUANTITY" >= 81.000000000000000000)) AND ("SS_QUANTITY" <= 100.000000000000000000)) ) END AS "bucket5"
from TPCDS.REASON 
where ("R_REASON_SK" = 1.000000000000000000)
Pushdown Oracle SQL, oracle plan stats estimates:
rowCount = 1, bytes=3
split target candidates:
name=STORE_SALES, row_count=27505, bytes=82515, partitions=(1, 74)
name=STORE_SALES, row_count=27505, bytes=192535, partitions=(1, 74)
name=STORE_SALES, row_count=27505, bytes=330060, partitions=(1, 74)
name=STORE_SALES, row_count=27505, bytes=82515, partitions=(1, 74)
name=STORE_SALES, row_count=27505, bytes=192535, partitions=(1, 74)
name=STORE_SALES, row_count=27505, bytes=330060, partitions=(1, 74)
name=STORE_SALES, row_count=27505, bytes=82515, partitions=(1, 74)
name=STORE_SALES, row_count=27505, bytes=192535, partitions=(1, 74)
name=STORE_SALES, row_count=27505, bytes=330060, partitions=(1, 74)
name=STORE_SALES, row_count=27505, bytes=82515, partitions=(1, 74)
name=STORE_SALES, row_count=27505, bytes=192535, partitions=(1, 74)
name=STORE_SALES, row_count=27505, bytes=330060, partitions=(1, 74)
name=STORE_SALES, row_count=27505, bytes=82515, partitions=(1, 74)
name=STORE_SALES, row_count=27505, bytes=192535, partitions=(1, 74)
name=STORE_SALES, row_count=27505, bytes=330060, partitions=(1, 74)
name=REASON, row_count=1, bytes=3
Pushdown Oracle SQL, Query Splitting details:
Query is not split

Spark Plan with Pushdown turned off

== Physical Plan ==
* Project (3)
+- * Filter (2)
   +- BatchScan (1)


(1) BatchScan
Output [1]: [R_REASON_SK#7406]
Format: orafile
OraPlan: 00 OraTableScan TPCDS.REASON, [R_REASON_SK#7839], [oracolumnref(R_REASON_SK#7839)], orabinaryopexpression((R_REASON_SK#7406 = 1.000000000000000000))
PartitionSchema: struct<>
ReadSchema: struct<R_REASON_SK:decimal(38,18)>
dsKey: DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
oraPushdownBindValues: 1.000000000000000000
oraPushdownSQL: select "R_REASON_SK"
from TPCDS.REASON
where ("R_REASON_SK" = ?)

(2) Filter [codegen id : 1]
Input [1]: [R_REASON_SK#7406]
Condition : (R_REASON_SK#7406 = 1.000000000000000000)

(3) Project [codegen id : 1]
Output [5]: [CASE WHEN (Subquery scalar-subquery#7386, [id=#3307] > 74129) THEN Subquery scalar-subquery#7387, [id=#3323] ELSE Subquery scalar-subquery#7388, [id=#3339] END AS bucket1#7389, CASE WHEN (Subquery scalar-subquery#7390, [id=#3355] > 122840) THEN Subquery scalar-subquery#7391, [id=#3371] ELSE Subquery scalar-subquery#7392, [id=#3387] END AS bucket2#7393, CASE WHEN (Subquery scalar-subquery#7394, [id=#3403] > 56580) THEN Subquery scalar-subquery#7395, [id=#3419] ELSE Subquery scalar-subquery#7396, [id=#3435] END AS bucket3#7397, CASE WHEN (Subquery scalar-subquery#7398, [id=#3451] > 10097) THEN Subquery scalar-subquery#7399, [id=#3467] ELSE Subquery scalar-subquery#7400, [id=#3483] END AS bucket4#7401, CASE WHEN (Subquery scalar-subquery#7402, [id=#3499] > 165306) THEN Subquery scalar-subquery#7403, [id=#3515] ELSE Subquery scalar-subquery#7404, [id=#3531] END AS bucket5#7405]
Input [1]: [R_REASON_SK#7406]

===== Subqueries =====

Subquery:1 Hosting operator id = 3 Hosting Expression = Subquery scalar-subquery#7386, [id=#3307]
* HashAggregate (8)
+- * HashAggregate (7)
   +- * Project (6)
      +- * Filter (5)
         +- BatchScan (4)


(4) BatchScan
Output [1]: [SS_QUANTITY#7419]
Format: orafile
OraPlan: 00 OraTableScan TPCDS.STORE_SALES, [SS_QUANTITY#7789], [oracolumnref(SS_QUANTITY#7789)], orabinaryopexpression(((isnotnull(SS_QUANTITY#7419) AND (SS_QUANTITY#7419 >= 1.000000000000000000)) AND (SS_QUANTITY#7419 <= 20.000000000000000000)))
PartitionSchema: struct<>
ReadSchema: struct<SS_QUANTITY:decimal(38,18)>
dsKey: DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
oraPushdownBindValues: 1.000000000000000000, 20.000000000000000000
oraPushdownSQL: select "SS_QUANTITY"
from TPCDS.STORE_SALES
where (("SS_QUANTITY" IS NOT NULL AND ("SS_QUANTITY" >= ?)) AND ("SS_QUANTITY" <= ?))

(5) Filter [codegen id : 1]
Input [1]: [SS_QUANTITY#7419]
Condition : ((isnotnull(SS_QUANTITY#7419) AND (SS_QUANTITY#7419 >= 1.000000000000000000)) AND (SS_QUANTITY#7419 <= 20.000000000000000000))

(6) Project [codegen id : 1]
Output: []
Input [1]: [SS_QUANTITY#7419]

(7) HashAggregate [codegen id : 1]
Input: []
Keys: []
Functions [1]: [partial_count(1)]
Aggregate Attributes [1]: [count#7841L]
Results [1]: [count#7842L]

(8) HashAggregate [codegen id : 1]
Input [1]: [count#7842L]
Keys: []
Functions [1]: [count(1)]
Aggregate Attributes [1]: [count(1)#7432L]
Results [1]: [count(1)#7432L AS count(1)#7433L]

Subquery:2 Hosting operator id = 3 Hosting Expression = Subquery scalar-subquery#7387, [id=#3323]
* HashAggregate (13)
+- * HashAggregate (12)
   +- * Project (11)
      +- * Filter (10)
         +- BatchScan (9)


(9) BatchScan
Output [2]: [SS_QUANTITY#7444, SS_EXT_DISCOUNT_AMT#7448]
Format: orafile
OraPlan: 00 OraTableScan TPCDS.STORE_SALES, [SS_QUANTITY#7791, SS_EXT_DISCOUNT_AMT#7792], [oracolumnref(SS_QUANTITY#7791), oracolumnref(SS_EXT_DISCOUNT_AMT#7792)], orabinaryopexpression(((isnotnull(SS_QUANTITY#7444) AND (SS_QUANTITY#7444 >= 1.000000000000000000)) AND (SS_QUANTITY#7444 <= 20.000000000000000000)))
PartitionSchema: struct<>
ReadSchema: struct<SS_QUANTITY:decimal(38,18),SS_EXT_DISCOUNT_AMT:decimal(38,18)>
dsKey: DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
oraPushdownBindValues: 1.000000000000000000, 20.000000000000000000
oraPushdownSQL: select "SS_QUANTITY", "SS_EXT_DISCOUNT_AMT"
from TPCDS.STORE_SALES
where (("SS_QUANTITY" IS NOT NULL AND ("SS_QUANTITY" >= ?)) AND ("SS_QUANTITY" <= ?))

(10) Filter [codegen id : 1]
Input [2]: [SS_QUANTITY#7444, SS_EXT_DISCOUNT_AMT#7448]
Condition : ((isnotnull(SS_QUANTITY#7444) AND (SS_QUANTITY#7444 >= 1.000000000000000000)) AND (SS_QUANTITY#7444 <= 20.000000000000000000))

(11) Project [codegen id : 1]
Output [1]: [SS_EXT_DISCOUNT_AMT#7448]
Input [2]: [SS_QUANTITY#7444, SS_EXT_DISCOUNT_AMT#7448]

(12) HashAggregate [codegen id : 1]
Input [1]: [SS_EXT_DISCOUNT_AMT#7448]
Keys: []
Functions [1]: [partial_avg(ss_ext_discount_amt#7448)]
Aggregate Attributes [2]: [sum#7843, count#7844L]
Results [2]: [sum#7845, count#7846L]

(13) HashAggregate [codegen id : 1]
Input [2]: [sum#7845, count#7846L]
Keys: []
Functions [1]: [avg(ss_ext_discount_amt#7448)]
Aggregate Attributes [1]: [avg(ss_ext_discount_amt#7448)#7457]
Results [1]: [avg(ss_ext_discount_amt#7448)#7457 AS avg(ss_ext_discount_amt)#7458]

Subquery:3 Hosting operator id = 3 Hosting Expression = Subquery scalar-subquery#7388, [id=#3339]
* HashAggregate (18)
+- * HashAggregate (17)
   +- * Project (16)
      +- * Filter (15)
         +- BatchScan (14)


(14) BatchScan
Output [2]: [SS_QUANTITY#7469, SS_NET_PAID#7479]
Format: orafile
OraPlan: 00 OraTableScan TPCDS.STORE_SALES, [SS_QUANTITY#7795, SS_NET_PAID#7796], [oracolumnref(SS_QUANTITY#7795), oracolumnref(SS_NET_PAID#7796)], orabinaryopexpression(((isnotnull(SS_QUANTITY#7469) AND (SS_QUANTITY#7469 >= 1.000000000000000000)) AND (SS_QUANTITY#7469 <= 20.000000000000000000)))
PartitionSchema: struct<>
ReadSchema: struct<SS_QUANTITY:decimal(38,18),SS_NET_PAID:decimal(38,18)>
dsKey: DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
oraPushdownBindValues: 1.000000000000000000, 20.000000000000000000
oraPushdownSQL: select "SS_QUANTITY", "SS_NET_PAID"
from TPCDS.STORE_SALES
where (("SS_QUANTITY" IS NOT NULL AND ("SS_QUANTITY" >= ?)) AND ("SS_QUANTITY" <= ?))

(15) Filter [codegen id : 1]
Input [2]: [SS_QUANTITY#7469, SS_NET_PAID#7479]
Condition : ((isnotnull(SS_QUANTITY#7469) AND (SS_QUANTITY#7469 >= 1.000000000000000000)) AND (SS_QUANTITY#7469 <= 20.000000000000000000))

(16) Project [codegen id : 1]
Output [1]: [SS_NET_PAID#7479]
Input [2]: [SS_QUANTITY#7469, SS_NET_PAID#7479]

(17) HashAggregate [codegen id : 1]
Input [1]: [SS_NET_PAID#7479]
Keys: []
Functions [1]: [partial_avg(ss_net_paid#7479)]
Aggregate Attributes [2]: [sum#7847, count#7848L]
Results [2]: [sum#7849, count#7850L]

(18) HashAggregate [codegen id : 1]
Input [2]: [sum#7849, count#7850L]
Keys: []
Functions [1]: [avg(ss_net_paid#7479)]
Aggregate Attributes [1]: [avg(ss_net_paid#7479)#7482]
Results [1]: [avg(ss_net_paid#7479)#7482 AS avg(ss_net_paid)#7483]

Subquery:4 Hosting operator id = 3 Hosting Expression = Subquery scalar-subquery#7390, [id=#3355]
* HashAggregate (23)
+- * HashAggregate (22)
   +- * Project (21)
      +- * Filter (20)
         +- BatchScan (19)


(19) BatchScan
Output [1]: [SS_QUANTITY#7494]
Format: orafile
OraPlan: 00 OraTableScan TPCDS.STORE_SALES, [SS_QUANTITY#7799], [oracolumnref(SS_QUANTITY#7799)], orabinaryopexpression(((isnotnull(SS_QUANTITY#7494) AND (SS_QUANTITY#7494 >= 21.000000000000000000)) AND (SS_QUANTITY#7494 <= 40.000000000000000000)))
PartitionSchema: struct<>
ReadSchema: struct<SS_QUANTITY:decimal(38,18)>
dsKey: DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
oraPushdownBindValues: 21.000000000000000000, 40.000000000000000000
oraPushdownSQL: select "SS_QUANTITY"
from TPCDS.STORE_SALES
where (("SS_QUANTITY" IS NOT NULL AND ("SS_QUANTITY" >= ?)) AND ("SS_QUANTITY" <= ?))

(20) Filter [codegen id : 1]
Input [1]: [SS_QUANTITY#7494]
Condition : ((isnotnull(SS_QUANTITY#7494) AND (SS_QUANTITY#7494 >= 21.000000000000000000)) AND (SS_QUANTITY#7494 <= 40.000000000000000000))

(21) Project [codegen id : 1]
Output: []
Input [1]: [SS_QUANTITY#7494]

(22) HashAggregate [codegen id : 1]
Input: []
Keys: []
Functions [1]: [partial_count(1)]
Aggregate Attributes [1]: [count#7851L]
Results [1]: [count#7852L]

(23) HashAggregate [codegen id : 1]
Input [1]: [count#7852L]
Keys: []
Functions [1]: [count(1)]
Aggregate Attributes [1]: [count(1)#7507L]
Results [1]: [count(1)#7507L AS count(1)#7508L]

Subquery:5 Hosting operator id = 3 Hosting Expression = Subquery scalar-subquery#7391, [id=#3371]
* HashAggregate (28)
+- * HashAggregate (27)
   +- * Project (26)
      +- * Filter (25)
         +- BatchScan (24)


(24) BatchScan
Output [2]: [SS_QUANTITY#7519, SS_EXT_DISCOUNT_AMT#7523]
Format: orafile
OraPlan: 00 OraTableScan TPCDS.STORE_SALES, [SS_QUANTITY#7801, SS_EXT_DISCOUNT_AMT#7802], [oracolumnref(SS_QUANTITY#7801), oracolumnref(SS_EXT_DISCOUNT_AMT#7802)], orabinaryopexpression(((isnotnull(SS_QUANTITY#7519) AND (SS_QUANTITY#7519 >= 21.000000000000000000)) AND (SS_QUANTITY#7519 <= 40.000000000000000000)))
PartitionSchema: struct<>
ReadSchema: struct<SS_QUANTITY:decimal(38,18),SS_EXT_DISCOUNT_AMT:decimal(38,18)>
dsKey: DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
oraPushdownBindValues: 21.000000000000000000, 40.000000000000000000
oraPushdownSQL: select "SS_QUANTITY", "SS_EXT_DISCOUNT_AMT"
from TPCDS.STORE_SALES
where (("SS_QUANTITY" IS NOT NULL AND ("SS_QUANTITY" >= ?)) AND ("SS_QUANTITY" <= ?))

(25) Filter [codegen id : 1]
Input [2]: [SS_QUANTITY#7519, SS_EXT_DISCOUNT_AMT#7523]
Condition : ((isnotnull(SS_QUANTITY#7519) AND (SS_QUANTITY#7519 >= 21.000000000000000000)) AND (SS_QUANTITY#7519 <= 40.000000000000000000))

(26) Project [codegen id : 1]
Output [1]: [SS_EXT_DISCOUNT_AMT#7523]
Input [2]: [SS_QUANTITY#7519, SS_EXT_DISCOUNT_AMT#7523]

(27) HashAggregate [codegen id : 1]
Input [1]: [SS_EXT_DISCOUNT_AMT#7523]
Keys: []
Functions [1]: [partial_avg(ss_ext_discount_amt#7523)]
Aggregate Attributes [2]: [sum#7853, count#7854L]
Results [2]: [sum#7855, count#7856L]

(28) HashAggregate [codegen id : 1]
Input [2]: [sum#7855, count#7856L]
Keys: []
Functions [1]: [avg(ss_ext_discount_amt#7523)]
Aggregate Attributes [1]: [avg(ss_ext_discount_amt#7523)#7532]
Results [1]: [avg(ss_ext_discount_amt#7523)#7532 AS avg(ss_ext_discount_amt)#7533]

Subquery:6 Hosting operator id = 3 Hosting Expression = Subquery scalar-subquery#7392, [id=#3387]
* HashAggregate (33)
+- * HashAggregate (32)
   +- * Project (31)
      +- * Filter (30)
         +- BatchScan (29)


(29) BatchScan
Output [2]: [SS_QUANTITY#7544, SS_NET_PAID#7554]
Format: orafile
OraPlan: 00 OraTableScan TPCDS.STORE_SALES, [SS_QUANTITY#7805, SS_NET_PAID#7806], [oracolumnref(SS_QUANTITY#7805), oracolumnref(SS_NET_PAID#7806)], orabinaryopexpression(((isnotnull(SS_QUANTITY#7544) AND (SS_QUANTITY#7544 >= 21.000000000000000000)) AND (SS_QUANTITY#7544 <= 40.000000000000000000)))
PartitionSchema: struct<>
ReadSchema: struct<SS_QUANTITY:decimal(38,18),SS_NET_PAID:decimal(38,18)>
dsKey: DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
oraPushdownBindValues: 21.000000000000000000, 40.000000000000000000
oraPushdownSQL: select "SS_QUANTITY", "SS_NET_PAID"
from TPCDS.STORE_SALES
where (("SS_QUANTITY" IS NOT NULL AND ("SS_QUANTITY" >= ?)) AND ("SS_QUANTITY" <= ?))

(30) Filter [codegen id : 1]
Input [2]: [SS_QUANTITY#7544, SS_NET_PAID#7554]
Condition : ((isnotnull(SS_QUANTITY#7544) AND (SS_QUANTITY#7544 >= 21.000000000000000000)) AND (SS_QUANTITY#7544 <= 40.000000000000000000))

(31) Project [codegen id : 1]
Output [1]: [SS_NET_PAID#7554]
Input [2]: [SS_QUANTITY#7544, SS_NET_PAID#7554]

(32) HashAggregate [codegen id : 1]
Input [1]: [SS_NET_PAID#7554]
Keys: []
Functions [1]: [partial_avg(ss_net_paid#7554)]
Aggregate Attributes [2]: [sum#7857, count#7858L]
Results [2]: [sum#7859, count#7860L]

(33) HashAggregate [codegen id : 1]
Input [2]: [sum#7859, count#7860L]
Keys: []
Functions [1]: [avg(ss_net_paid#7554)]
Aggregate Attributes [1]: [avg(ss_net_paid#7554)#7557]
Results [1]: [avg(ss_net_paid#7554)#7557 AS avg(ss_net_paid)#7558]

Subquery:7 Hosting operator id = 3 Hosting Expression = Subquery scalar-subquery#7394, [id=#3403]
* HashAggregate (38)
+- * HashAggregate (37)
   +- * Project (36)
      +- * Filter (35)
         +- BatchScan (34)


(34) BatchScan
Output [1]: [SS_QUANTITY#7569]
Format: orafile
OraPlan: 00 OraTableScan TPCDS.STORE_SALES, [SS_QUANTITY#7809], [oracolumnref(SS_QUANTITY#7809)], orabinaryopexpression(((isnotnull(SS_QUANTITY#7569) AND (SS_QUANTITY#7569 >= 41.000000000000000000)) AND (SS_QUANTITY#7569 <= 60.000000000000000000)))
PartitionSchema: struct<>
ReadSchema: struct<SS_QUANTITY:decimal(38,18)>
dsKey: DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
oraPushdownBindValues: 41.000000000000000000, 60.000000000000000000
oraPushdownSQL: select "SS_QUANTITY"
from TPCDS.STORE_SALES
where (("SS_QUANTITY" IS NOT NULL AND ("SS_QUANTITY" >= ?)) AND ("SS_QUANTITY" <= ?))

(35) Filter [codegen id : 1]
Input [1]: [SS_QUANTITY#7569]
Condition : ((isnotnull(SS_QUANTITY#7569) AND (SS_QUANTITY#7569 >= 41.000000000000000000)) AND (SS_QUANTITY#7569 <= 60.000000000000000000))

(36) Project [codegen id : 1]
Output: []
Input [1]: [SS_QUANTITY#7569]

(37) HashAggregate [codegen id : 1]
Input: []
Keys: []
Functions [1]: [partial_count(1)]
Aggregate Attributes [1]: [count#7861L]
Results [1]: [count#7862L]

(38) HashAggregate [codegen id : 1]
Input [1]: [count#7862L]
Keys: []
Functions [1]: [count(1)]
Aggregate Attributes [1]: [count(1)#7582L]
Results [1]: [count(1)#7582L AS count(1)#7583L]

Subquery:8 Hosting operator id = 3 Hosting Expression = Subquery scalar-subquery#7395, [id=#3419]
* HashAggregate (43)
+- * HashAggregate (42)
   +- * Project (41)
      +- * Filter (40)
         +- BatchScan (39)


(39) BatchScan
Output [2]: [SS_QUANTITY#7594, SS_EXT_DISCOUNT_AMT#7598]
Format: orafile
OraPlan: 00 OraTableScan TPCDS.STORE_SALES, [SS_QUANTITY#7811, SS_EXT_DISCOUNT_AMT#7812], [oracolumnref(SS_QUANTITY#7811), oracolumnref(SS_EXT_DISCOUNT_AMT#7812)], orabinaryopexpression(((isnotnull(SS_QUANTITY#7594) AND (SS_QUANTITY#7594 >= 41.000000000000000000)) AND (SS_QUANTITY#7594 <= 60.000000000000000000)))
PartitionSchema: struct<>
ReadSchema: struct<SS_QUANTITY:decimal(38,18),SS_EXT_DISCOUNT_AMT:decimal(38,18)>
dsKey: DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
oraPushdownBindValues: 41.000000000000000000, 60.000000000000000000
oraPushdownSQL: select "SS_QUANTITY", "SS_EXT_DISCOUNT_AMT"
from TPCDS.STORE_SALES
where (("SS_QUANTITY" IS NOT NULL AND ("SS_QUANTITY" >= ?)) AND ("SS_QUANTITY" <= ?))

(40) Filter [codegen id : 1]
Input [2]: [SS_QUANTITY#7594, SS_EXT_DISCOUNT_AMT#7598]
Condition : ((isnotnull(SS_QUANTITY#7594) AND (SS_QUANTITY#7594 >= 41.000000000000000000)) AND (SS_QUANTITY#7594 <= 60.000000000000000000))

(41) Project [codegen id : 1]
Output [1]: [SS_EXT_DISCOUNT_AMT#7598]
Input [2]: [SS_QUANTITY#7594, SS_EXT_DISCOUNT_AMT#7598]

(42) HashAggregate [codegen id : 1]
Input [1]: [SS_EXT_DISCOUNT_AMT#7598]
Keys: []
Functions [1]: [partial_avg(ss_ext_discount_amt#7598)]
Aggregate Attributes [2]: [sum#7863, count#7864L]
Results [2]: [sum#7865, count#7866L]

(43) HashAggregate [codegen id : 1]
Input [2]: [sum#7865, count#7866L]
Keys: []
Functions [1]: [avg(ss_ext_discount_amt#7598)]
Aggregate Attributes [1]: [avg(ss_ext_discount_amt#7598)#7607]
Results [1]: [avg(ss_ext_discount_amt#7598)#7607 AS avg(ss_ext_discount_amt)#7608]

Subquery:9 Hosting operator id = 3 Hosting Expression = Subquery scalar-subquery#7396, [id=#3435]
* HashAggregate (48)
+- * HashAggregate (47)
   +- * Project (46)
      +- * Filter (45)
         +- BatchScan (44)


(44) BatchScan
Output [2]: [SS_QUANTITY#7619, SS_NET_PAID#7629]
Format: orafile
OraPlan: 00 OraTableScan TPCDS.STORE_SALES, [SS_QUANTITY#7815, SS_NET_PAID#7816], [oracolumnref(SS_QUANTITY#7815), oracolumnref(SS_NET_PAID#7816)], orabinaryopexpression(((isnotnull(SS_QUANTITY#7619) AND (SS_QUANTITY#7619 >= 41.000000000000000000)) AND (SS_QUANTITY#7619 <= 60.000000000000000000)))
PartitionSchema: struct<>
ReadSchema: struct<SS_QUANTITY:decimal(38,18),SS_NET_PAID:decimal(38,18)>
dsKey: DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
oraPushdownBindValues: 41.000000000000000000, 60.000000000000000000
oraPushdownSQL: select "SS_QUANTITY", "SS_NET_PAID"
from TPCDS.STORE_SALES
where (("SS_QUANTITY" IS NOT NULL AND ("SS_QUANTITY" >= ?)) AND ("SS_QUANTITY" <= ?))

(45) Filter [codegen id : 1]
Input [2]: [SS_QUANTITY#7619, SS_NET_PAID#7629]
Condition : ((isnotnull(SS_QUANTITY#7619) AND (SS_QUANTITY#7619 >= 41.000000000000000000)) AND (SS_QUANTITY#7619 <= 60.000000000000000000))

(46) Project [codegen id : 1]
Output [1]: [SS_NET_PAID#7629]
Input [2]: [SS_QUANTITY#7619, SS_NET_PAID#7629]

(47) HashAggregate [codegen id : 1]
Input [1]: [SS_NET_PAID#7629]
Keys: []
Functions [1]: [partial_avg(ss_net_paid#7629)]
Aggregate Attributes [2]: [sum#7867, count#7868L]
Results [2]: [sum#7869, count#7870L]

(48) HashAggregate [codegen id : 1]
Input [2]: [sum#7869, count#7870L]
Keys: []
Functions [1]: [avg(ss_net_paid#7629)]
Aggregate Attributes [1]: [avg(ss_net_paid#7629)#7632]
Results [1]: [avg(ss_net_paid#7629)#7632 AS avg(ss_net_paid)#7633]

Subquery:10 Hosting operator id = 3 Hosting Expression = Subquery scalar-subquery#7398, [id=#3451]
* HashAggregate (53)
+- * HashAggregate (52)
   +- * Project (51)
      +- * Filter (50)
         +- BatchScan (49)


(49) BatchScan
Output [1]: [SS_QUANTITY#7644]
Format: orafile
OraPlan: 00 OraTableScan TPCDS.STORE_SALES, [SS_QUANTITY#7819], [oracolumnref(SS_QUANTITY#7819)], orabinaryopexpression(((isnotnull(SS_QUANTITY#7644) AND (SS_QUANTITY#7644 >= 61.000000000000000000)) AND (SS_QUANTITY#7644 <= 80.000000000000000000)))
PartitionSchema: struct<>
ReadSchema: struct<SS_QUANTITY:decimal(38,18)>
dsKey: DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
oraPushdownBindValues: 61.000000000000000000, 80.000000000000000000
oraPushdownSQL: select "SS_QUANTITY"
from TPCDS.STORE_SALES
where (("SS_QUANTITY" IS NOT NULL AND ("SS_QUANTITY" >= ?)) AND ("SS_QUANTITY" <= ?))

(50) Filter [codegen id : 1]
Input [1]: [SS_QUANTITY#7644]
Condition : ((isnotnull(SS_QUANTITY#7644) AND (SS_QUANTITY#7644 >= 61.000000000000000000)) AND (SS_QUANTITY#7644 <= 80.000000000000000000))

(51) Project [codegen id : 1]
Output: []
Input [1]: [SS_QUANTITY#7644]

(52) HashAggregate [codegen id : 1]
Input: []
Keys: []
Functions [1]: [partial_count(1)]
Aggregate Attributes [1]: [count#7871L]
Results [1]: [count#7872L]

(53) HashAggregate [codegen id : 1]
Input [1]: [count#7872L]
Keys: []
Functions [1]: [count(1)]
Aggregate Attributes [1]: [count(1)#7657L]
Results [1]: [count(1)#7657L AS count(1)#7658L]

Subquery:11 Hosting operator id = 3 Hosting Expression = Subquery scalar-subquery#7399, [id=#3467]
* HashAggregate (58)
+- * HashAggregate (57)
   +- * Project (56)
      +- * Filter (55)
         +- BatchScan (54)


(54) BatchScan
Output [2]: [SS_QUANTITY#7669, SS_EXT_DISCOUNT_AMT#7673]
Format: orafile
OraPlan: 00 OraTableScan TPCDS.STORE_SALES, [SS_QUANTITY#7821, SS_EXT_DISCOUNT_AMT#7822], [oracolumnref(SS_QUANTITY#7821), oracolumnref(SS_EXT_DISCOUNT_AMT#7822)], orabinaryopexpression(((isnotnull(SS_QUANTITY#7669) AND (SS_QUANTITY#7669 >= 61.000000000000000000)) AND (SS_QUANTITY#7669 <= 80.000000000000000000)))
PartitionSchema: struct<>
ReadSchema: struct<SS_QUANTITY:decimal(38,18),SS_EXT_DISCOUNT_AMT:decimal(38,18)>
dsKey: DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
oraPushdownBindValues: 61.000000000000000000, 80.000000000000000000
oraPushdownSQL: select "SS_QUANTITY", "SS_EXT_DISCOUNT_AMT"
from TPCDS.STORE_SALES
where (("SS_QUANTITY" IS NOT NULL AND ("SS_QUANTITY" >= ?)) AND ("SS_QUANTITY" <= ?))

(55) Filter [codegen id : 1]
Input [2]: [SS_QUANTITY#7669, SS_EXT_DISCOUNT_AMT#7673]
Condition : ((isnotnull(SS_QUANTITY#7669) AND (SS_QUANTITY#7669 >= 61.000000000000000000)) AND (SS_QUANTITY#7669 <= 80.000000000000000000))

(56) Project [codegen id : 1]
Output [1]: [SS_EXT_DISCOUNT_AMT#7673]
Input [2]: [SS_QUANTITY#7669, SS_EXT_DISCOUNT_AMT#7673]

(57) HashAggregate [codegen id : 1]
Input [1]: [SS_EXT_DISCOUNT_AMT#7673]
Keys: []
Functions [1]: [partial_avg(ss_ext_discount_amt#7673)]
Aggregate Attributes [2]: [sum#7873, count#7874L]
Results [2]: [sum#7875, count#7876L]

(58) HashAggregate [codegen id : 1]
Input [2]: [sum#7875, count#7876L]
Keys: []
Functions [1]: [avg(ss_ext_discount_amt#7673)]
Aggregate Attributes [1]: [avg(ss_ext_discount_amt#7673)#7682]
Results [1]: [avg(ss_ext_discount_amt#7673)#7682 AS avg(ss_ext_discount_amt)#7683]

Subquery:12 Hosting operator id = 3 Hosting Expression = Subquery scalar-subquery#7400, [id=#3483]
* HashAggregate (63)
+- * HashAggregate (62)
   +- * Project (61)
      +- * Filter (60)
         +- BatchScan (59)


(59) BatchScan
Output [2]: [SS_QUANTITY#7694, SS_NET_PAID#7704]
Format: orafile
OraPlan: 00 OraTableScan TPCDS.STORE_SALES, [SS_QUANTITY#7825, SS_NET_PAID#7826], [oracolumnref(SS_QUANTITY#7825), oracolumnref(SS_NET_PAID#7826)], orabinaryopexpression(((isnotnull(SS_QUANTITY#7694) AND (SS_QUANTITY#7694 >= 61.000000000000000000)) AND (SS_QUANTITY#7694 <= 80.000000000000000000)))
PartitionSchema: struct<>
ReadSchema: struct<SS_QUANTITY:decimal(38,18),SS_NET_PAID:decimal(38,18)>
dsKey: DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
oraPushdownBindValues: 61.000000000000000000, 80.000000000000000000
oraPushdownSQL: select "SS_QUANTITY", "SS_NET_PAID"
from TPCDS.STORE_SALES
where (("SS_QUANTITY" IS NOT NULL AND ("SS_QUANTITY" >= ?)) AND ("SS_QUANTITY" <= ?))

(60) Filter [codegen id : 1]
Input [2]: [SS_QUANTITY#7694, SS_NET_PAID#7704]
Condition : ((isnotnull(SS_QUANTITY#7694) AND (SS_QUANTITY#7694 >= 61.000000000000000000)) AND (SS_QUANTITY#7694 <= 80.000000000000000000))

(61) Project [codegen id : 1]
Output [1]: [SS_NET_PAID#7704]
Input [2]: [SS_QUANTITY#7694, SS_NET_PAID#7704]

(62) HashAggregate [codegen id : 1]
Input [1]: [SS_NET_PAID#7704]
Keys: []
Functions [1]: [partial_avg(ss_net_paid#7704)]
Aggregate Attributes [2]: [sum#7877, count#7878L]
Results [2]: [sum#7879, count#7880L]

(63) HashAggregate [codegen id : 1]
Input [2]: [sum#7879, count#7880L]
Keys: []
Functions [1]: [avg(ss_net_paid#7704)]
Aggregate Attributes [1]: [avg(ss_net_paid#7704)#7707]
Results [1]: [avg(ss_net_paid#7704)#7707 AS avg(ss_net_paid)#7708]

Subquery:13 Hosting operator id = 3 Hosting Expression = Subquery scalar-subquery#7402, [id=#3499]
* HashAggregate (68)
+- * HashAggregate (67)
   +- * Project (66)
      +- * Filter (65)
         +- BatchScan (64)


(64) BatchScan
Output [1]: [SS_QUANTITY#7719]
Format: orafile
OraPlan: 00 OraTableScan TPCDS.STORE_SALES, [SS_QUANTITY#7829], [oracolumnref(SS_QUANTITY#7829)], orabinaryopexpression(((isnotnull(SS_QUANTITY#7719) AND (SS_QUANTITY#7719 >= 81.000000000000000000)) AND (SS_QUANTITY#7719 <= 100.000000000000000000)))
PartitionSchema: struct<>
ReadSchema: struct<SS_QUANTITY:decimal(38,18)>
dsKey: DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
oraPushdownBindValues: 81.000000000000000000, 100.000000000000000000
oraPushdownSQL: select "SS_QUANTITY"
from TPCDS.STORE_SALES
where (("SS_QUANTITY" IS NOT NULL AND ("SS_QUANTITY" >= ?)) AND ("SS_QUANTITY" <= ?))

(65) Filter [codegen id : 1]
Input [1]: [SS_QUANTITY#7719]
Condition : ((isnotnull(SS_QUANTITY#7719) AND (SS_QUANTITY#7719 >= 81.000000000000000000)) AND (SS_QUANTITY#7719 <= 100.000000000000000000))

(66) Project [codegen id : 1]
Output: []
Input [1]: [SS_QUANTITY#7719]

(67) HashAggregate [codegen id : 1]
Input: []
Keys: []
Functions [1]: [partial_count(1)]
Aggregate Attributes [1]: [count#7881L]
Results [1]: [count#7882L]

(68) HashAggregate [codegen id : 1]
Input [1]: [count#7882L]
Keys: []
Functions [1]: [count(1)]
Aggregate Attributes [1]: [count(1)#7732L]
Results [1]: [count(1)#7732L AS count(1)#7733L]

Subquery:14 Hosting operator id = 3 Hosting Expression = Subquery scalar-subquery#7403, [id=#3515]
* HashAggregate (73)
+- * HashAggregate (72)
   +- * Project (71)
      +- * Filter (70)
         +- BatchScan (69)


(69) BatchScan
Output [2]: [SS_QUANTITY#7744, SS_EXT_DISCOUNT_AMT#7748]
Format: orafile
OraPlan: 00 OraTableScan TPCDS.STORE_SALES, [SS_QUANTITY#7831, SS_EXT_DISCOUNT_AMT#7832], [oracolumnref(SS_QUANTITY#7831), oracolumnref(SS_EXT_DISCOUNT_AMT#7832)], orabinaryopexpression(((isnotnull(SS_QUANTITY#7744) AND (SS_QUANTITY#7744 >= 81.000000000000000000)) AND (SS_QUANTITY#7744 <= 100.000000000000000000)))
PartitionSchema: struct<>
ReadSchema: struct<SS_QUANTITY:decimal(38,18),SS_EXT_DISCOUNT_AMT:decimal(38,18)>
dsKey: DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
oraPushdownBindValues: 81.000000000000000000, 100.000000000000000000
oraPushdownSQL: select "SS_QUANTITY", "SS_EXT_DISCOUNT_AMT"
from TPCDS.STORE_SALES
where (("SS_QUANTITY" IS NOT NULL AND ("SS_QUANTITY" >= ?)) AND ("SS_QUANTITY" <= ?))

(70) Filter [codegen id : 1]
Input [2]: [SS_QUANTITY#7744, SS_EXT_DISCOUNT_AMT#7748]
Condition : ((isnotnull(SS_QUANTITY#7744) AND (SS_QUANTITY#7744 >= 81.000000000000000000)) AND (SS_QUANTITY#7744 <= 100.000000000000000000))

(71) Project [codegen id : 1]
Output [1]: [SS_EXT_DISCOUNT_AMT#7748]
Input [2]: [SS_QUANTITY#7744, SS_EXT_DISCOUNT_AMT#7748]

(72) HashAggregate [codegen id : 1]
Input [1]: [SS_EXT_DISCOUNT_AMT#7748]
Keys: []
Functions [1]: [partial_avg(ss_ext_discount_amt#7748)]
Aggregate Attributes [2]: [sum#7883, count#7884L]
Results [2]: [sum#7885, count#7886L]

(73) HashAggregate [codegen id : 1]
Input [2]: [sum#7885, count#7886L]
Keys: []
Functions [1]: [avg(ss_ext_discount_amt#7748)]
Aggregate Attributes [1]: [avg(ss_ext_discount_amt#7748)#7757]
Results [1]: [avg(ss_ext_discount_amt#7748)#7757 AS avg(ss_ext_discount_amt)#7758]

Subquery:15 Hosting operator id = 3 Hosting Expression = Subquery scalar-subquery#7404, [id=#3531]
* HashAggregate (78)
+- * HashAggregate (77)
   +- * Project (76)
      +- * Filter (75)
         +- BatchScan (74)


(74) BatchScan
Output [2]: [SS_QUANTITY#7769, SS_NET_PAID#7779]
Format: orafile
OraPlan: 00 OraTableScan TPCDS.STORE_SALES, [SS_QUANTITY#7835, SS_NET_PAID#7836], [oracolumnref(SS_QUANTITY#7835), oracolumnref(SS_NET_PAID#7836)], orabinaryopexpression(((isnotnull(SS_QUANTITY#7769) AND (SS_QUANTITY#7769 >= 81.000000000000000000)) AND (SS_QUANTITY#7769 <= 100.000000000000000000)))
PartitionSchema: struct<>
ReadSchema: struct<SS_QUANTITY:decimal(38,18),SS_NET_PAID:decimal(38,18)>
dsKey: DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
oraPushdownBindValues: 81.000000000000000000, 100.000000000000000000
oraPushdownSQL: select "SS_QUANTITY", "SS_NET_PAID"
from TPCDS.STORE_SALES
where (("SS_QUANTITY" IS NOT NULL AND ("SS_QUANTITY" >= ?)) AND ("SS_QUANTITY" <= ?))

(75) Filter [codegen id : 1]
Input [2]: [SS_QUANTITY#7769, SS_NET_PAID#7779]
Condition : ((isnotnull(SS_QUANTITY#7769) AND (SS_QUANTITY#7769 >= 81.000000000000000000)) AND (SS_QUANTITY#7769 <= 100.000000000000000000))

(76) Project [codegen id : 1]
Output [1]: [SS_NET_PAID#7779]
Input [2]: [SS_QUANTITY#7769, SS_NET_PAID#7779]

(77) HashAggregate [codegen id : 1]
Input [1]: [SS_NET_PAID#7779]
Keys: []
Functions [1]: [partial_avg(ss_net_paid#7779)]
Aggregate Attributes [2]: [sum#7887, count#7888L]
Results [2]: [sum#7889, count#7890L]

(78) HashAggregate [codegen id : 1]
Input [2]: [sum#7889, count#7890L]
Keys: []
Functions [1]: [avg(ss_net_paid#7779)]
Aggregate Attributes [1]: [avg(ss_net_paid#7779)#7782]
Results [1]: [avg(ss_net_paid#7779)#7782 AS avg(ss_net_paid)#7783]



Query q10

Spark SQL

select
  cd_gender,
  cd_marital_status,
  cd_education_status,
  count(*) cnt1,
  cd_purchase_estimate,
  count(*) cnt2,
  cd_credit_rating,
  count(*) cnt3,
  cd_dep_count,
  count(*) cnt4,
  cd_dep_employed_count,
  count(*) cnt5,
  cd_dep_college_count,
  count(*) cnt6
 from
  customer c,customer_address ca,customer_demographics
 where
  c.c_current_addr_sk = ca.ca_address_sk and
  ca_county in ('Rush County','Toole County','Jefferson County','Dona Ana County','La Porte County') and
  cd_demo_sk = c.c_current_cdemo_sk and
  exists (select *
          from store_sales,date_dim
          where c.c_customer_sk = ss_customer_sk and
                ss_sold_date_sk = d_date_sk and
                d_year = 2002 and
                d_moy between 1 and 1+3) and
   (exists (select *
            from web_sales,date_dim
            where c.c_customer_sk = ws_bill_customer_sk and
                  ws_sold_date_sk = d_date_sk and
                  d_year = 2002 and
                  d_moy between 1 ANd 1+3) or
    exists (select *
            from catalog_sales,date_dim
            where c.c_customer_sk = cs_ship_customer_sk and
                  cs_sold_date_sk = d_date_sk and
                  d_year = 2002 and
                  d_moy between 1 and 1+3))
 group by cd_gender,
          cd_marital_status,
          cd_education_status,
          cd_purchase_estimate,
          cd_credit_rating,
          cd_dep_count,
          cd_dep_employed_count,
          cd_dep_college_count
 order by cd_gender,
          cd_marital_status,
          cd_education_status,
          cd_purchase_estimate,
          cd_credit_rating,
          cd_dep_count,
          cd_dep_employed_count,
          cd_dep_college_count
 limit 100;
 

Spark Plan with Pushdown turned on

TakeOrderedAndProject (1)
+- HashAggregate (2)
   +- HashAggregate (3)
      +- Project (4)
         +- SortMergeJoin Inner (5)
            :- Project (6)
            :  +- SortMergeJoin Inner (7)
            :     :- Project (8)
            :     :  +- Filter (9)
            :     :     +- SortMergeJoin ExistenceJoin(exists#9662) (10)
            :     :        :- SortMergeJoin ExistenceJoin(exists#9661) (11)
            :     :        :  :- Project (12)
            :     :        :  :  +- BatchScan (13)
            :     :        :  +- Project (14)
            :     :        :     +- BatchScan (15)
            :     :        +- Project (16)
            :     :           +- BatchScan (17)
            :     +- Project (18)
            :        +- BatchScan (19)
            +- Project (20)
               +- BatchScan (21)

(13) BatchScan
Oracle Instance:
   DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
Pushdown Oracle SQL:
select "C_CUSTOMER_SK", "C_CURRENT_CDEMO_SK", "C_CURRENT_ADDR_SK"
from TPCDS.CUSTOMER 
where (("C_CURRENT_ADDR_SK" IS NOT NULL AND "C_CURRENT_CDEMO_SK" IS NOT NULL) AND  "C_CUSTOMER_SK" IN ( select "SS_CUSTOMER_SK"
from TPCDS.STORE_SALES  join TPCDS.DATE_DIM  on ("SS_SOLD_DATE_SK" = "D_DATE_SK")
where ("SS_SOLD_DATE_SK" IS NOT NULL AND (((("D_YEAR" IS NOT NULL AND "D_MOY" IS NOT NULL) AND ("D_YEAR" = 2002.000000000000000000)) AND ("D_MOY" >= 1.000000000000000000)) AND ("D_MOY" <= 4.000000000000000000))) ))
Pushdown Oracle SQL, oracle plan stats estimates:
rowCount = 43635, bytes=1265415
Pushdown Oracle SQL, Query Splitting details:
Query is not split
(15) BatchScan
Oracle Instance:
   DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
Pushdown Oracle SQL:
select "WS_BILL_CUSTOMER_SK"
from TPCDS.WEB_SALES  join TPCDS.DATE_DIM  on ("WS_SOLD_DATE_SK" = "D_DATE_SK")
where ("WS_SOLD_DATE_SK" IS NOT NULL AND (((("D_YEAR" IS NOT NULL AND "D_MOY" IS NOT NULL) AND ("D_YEAR" = 2002.000000000000000000)) AND ("D_MOY" >= 1.000000000000000000)) AND ("D_MOY" <= 4.000000000000000000)))
Pushdown Oracle SQL, oracle plan stats estimates:
rowCount = 11947, bytes=286728
split target candidates:
name=DATE_DIM, row_count=30, bytes=390
name=WEB_SALES, row_count=719195, bytes=7911145
Pushdown Oracle SQL, Query Splitting details:
Query is not split
(17) BatchScan
Oracle Instance:
   DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
Pushdown Oracle SQL:
select "CS_SHIP_CUSTOMER_SK"
from TPCDS.CATALOG_SALES  join TPCDS.DATE_DIM  on ("CS_SOLD_DATE_SK" = "D_DATE_SK")
where ("CS_SOLD_DATE_SK" IS NOT NULL AND (((("D_YEAR" IS NOT NULL AND "D_MOY" IS NOT NULL) AND ("D_YEAR" = 2002.000000000000000000)) AND ("D_MOY" >= 1.000000000000000000)) AND ("D_MOY" <= 4.000000000000000000)))
Pushdown Oracle SQL, oracle plan stats estimates:
rowCount = 23624, bytes=566976
split target candidates:
name=DATE_DIM, row_count=30, bytes=390
name=CATALOG_SALES, row_count=1434368, bytes=15778048
Pushdown Oracle SQL, Query Splitting details:
Query is not split
(19) BatchScan
Oracle Instance:
   DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
Pushdown Oracle SQL:
select "CA_ADDRESS_SK"
from TPCDS.CUSTOMER_ADDRESS 
where "CA_COUNTY" IN ( 'Rush County', 'Toole County', 'Jefferson County', 'Dona Ana County', 'La Porte County' )
Pushdown Oracle SQL, oracle plan stats estimates:
rowCount = 131, bytes=2620
split target candidates:
name=CUSTOMER_ADDRESS, row_count=131, bytes=2620
Pushdown Oracle SQL, Query Splitting details:
Query is not split
(21) BatchScan
Oracle Instance:
   DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
Pushdown Oracle SQL:
select "CD_DEMO_SK", "CD_GENDER", "CD_MARITAL_STATUS", "CD_EDUCATION_STATUS", "CD_PURCHASE_ESTIMATE", "CD_CREDIT_RATING", "CD_DEP_COUNT", "CD_DEP_EMPLOYED_COUNT", "CD_DEP_COLLEGE_COUNT"
from TPCDS.CUSTOMER_DEMOGRAPHICS 
Pushdown Oracle SQL, oracle plan stats estimates:
rowCount = 1920800, bytes=101802400
split target candidates:
name=CUSTOMER_DEMOGRAPHICS, row_count=1920800, bytes=101802400
Pushdown Oracle SQL, Query Splitting details:
Query split by row ids
Target table:
name=CUSTOMER_DEMOGRAPHICS, row_count=1920800, bytes=101802400
Splits:
start-rowId = AAASnpAAAAAAl+AAAA, end-rowId=AAASnpAAAAAAm7LH//
start-rowId = AAASnpAAAAAAm7MAAA, end-rowId=AAASnpAAAAAAn4XH//
start-rowId = AAASnpAAAAAAn4YAAA, end-rowId=AAASnpAAAAAAo1jH//
start-rowId = AAASnpAAAAAAo1kAAA, end-rowId=AAASnpAAAAAApyvH//
start-rowId = AAASnpAAAAAApywAAA, end-rowId=AAASnpAAAAAAp9/H//

Spark Plan with Pushdown turned off

== Physical Plan ==
TakeOrderedAndProject (69)
+- * HashAggregate (68)
   +- Exchange (67)
      +- * HashAggregate (66)
         +- * Project (65)
            +- * SortMergeJoin Inner (64)
               :- * Sort (59)
               :  +- Exchange (58)
               :     +- * Project (57)
               :        +- * SortMergeJoin Inner (56)
               :           :- * Sort (50)
               :           :  +- Exchange (49)
               :           :     +- * Project (48)
               :           :        +- * Filter (47)
               :           :           +- SortMergeJoin ExistenceJoin(exists#9036) (46)
               :           :              :- SortMergeJoin ExistenceJoin(exists#9035) (32)
               :           :              :  :- SortMergeJoin LeftSemi (18)
               :           :              :  :  :- * Sort (4)
               :           :              :  :  :  +- Exchange (3)
               :           :              :  :  :     +- * Filter (2)
               :           :              :  :  :        +- BatchScan (1)
               :           :              :  :  +- * Sort (17)
               :           :              :  :     +- Exchange (16)
               :           :              :  :        +- * Project (15)
               :           :              :  :           +- * SortMergeJoin Inner (14)
               :           :              :  :              :- * Sort (8)
               :           :              :  :              :  +- Exchange (7)
               :           :              :  :              :     +- * Project (6)
               :           :              :  :              :        +- BatchScan (5)
               :           :              :  :              +- * Sort (13)
               :           :              :  :                 +- Exchange (12)
               :           :              :  :                    +- * Project (11)
               :           :              :  :                       +- * Filter (10)
               :           :              :  :                          +- BatchScan (9)
               :           :              :  +- * Sort (31)
               :           :              :     +- Exchange (30)
               :           :              :        +- * Project (29)
               :           :              :           +- * SortMergeJoin Inner (28)
               :           :              :              :- * Sort (22)
               :           :              :              :  +- Exchange (21)
               :           :              :              :     +- * Project (20)
               :           :              :              :        +- BatchScan (19)
               :           :              :              +- * Sort (27)
               :           :              :                 +- Exchange (26)
               :           :              :                    +- * Project (25)
               :           :              :                       +- * Filter (24)
               :           :              :                          +- BatchScan (23)
               :           :              +- * Sort (45)
               :           :                 +- Exchange (44)
               :           :                    +- * Project (43)
               :           :                       +- * SortMergeJoin Inner (42)
               :           :                          :- * Sort (36)
               :           :                          :  +- Exchange (35)
               :           :                          :     +- * Project (34)
               :           :                          :        +- BatchScan (33)
               :           :                          +- * Sort (41)
               :           :                             +- Exchange (40)
               :           :                                +- * Project (39)
               :           :                                   +- * Filter (38)
               :           :                                      +- BatchScan (37)
               :           +- * Sort (55)
               :              +- Exchange (54)
               :                 +- * Project (53)
               :                    +- * Filter (52)
               :                       +- BatchScan (51)
               +- * Sort (63)
                  +- Exchange (62)
                     +- * Project (61)
                        +- BatchScan (60)


(1) BatchScan
Output [3]: [C_CUSTOMER_SK#8422, C_CURRENT_CDEMO_SK#8424, C_CURRENT_ADDR_SK#8426]
Format: orafile
OraPlan: 00 OraTableScan TPCDS.CUSTOMER, [C_CUSTOMER_SK#9007, C_CURRENT_CDEMO_SK#9008, C_CURRENT_ADDR_SK#9009], [oracolumnref(C_CUSTOMER_SK#9007), oracolumnref(C_CURRENT_CDEMO_SK#9008), oracolumnref(C_CURRENT_ADDR_SK#9009)], orabinaryopexpression((isnotnull(C_CURRENT_ADDR_SK#8426) AND isnotnull(C_CURRENT_CDEMO_SK#8424)))
PartitionSchema: struct<>
ReadSchema: struct<C_CUSTOMER_SK:decimal(38,18),C_CURRENT_CDEMO_SK:decimal(38,18),C_CURRENT_ADDR_SK:decimal(38,18)>
dsKey: DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
oraPushdownSQL: select "C_CUSTOMER_SK", "C_CURRENT_CDEMO_SK", "C_CURRENT_ADDR_SK"
from TPCDS.CUSTOMER
where ("C_CURRENT_ADDR_SK" IS NOT NULL AND "C_CURRENT_CDEMO_SK" IS NOT NULL)

(2) Filter [codegen id : 1]
Input [3]: [C_CUSTOMER_SK#8422, C_CURRENT_CDEMO_SK#8424, C_CURRENT_ADDR_SK#8426]
Condition : (isnotnull(C_CURRENT_ADDR_SK#8426) AND isnotnull(C_CURRENT_CDEMO_SK#8424))

(3) Exchange
Input [3]: [C_CUSTOMER_SK#8422, C_CURRENT_CDEMO_SK#8424, C_CURRENT_ADDR_SK#8426]
Arguments: hashpartitioning(C_CUSTOMER_SK#8422, 5), ENSURE_REQUIREMENTS, [id=#3912]

(4) Sort [codegen id : 2]
Input [3]: [C_CUSTOMER_SK#8422, C_CURRENT_CDEMO_SK#8424, C_CURRENT_ADDR_SK#8426]
Arguments: [C_CUSTOMER_SK#8422 ASC NULLS FIRST], false, 0

(5) BatchScan
Output [23]: [SS_SOLD_TIME_SK#8469, SS_ITEM_SK#8470, SS_CUSTOMER_SK#8471, SS_CDEMO_SK#8472, SS_HDEMO_SK#8473, SS_ADDR_SK#8474, SS_STORE_SK#8475, SS_PROMO_SK#8476, SS_TICKET_NUMBER#8477, SS_QUANTITY#8478, SS_WHOLESALE_COST#8479, SS_LIST_PRICE#8480, SS_SALES_PRICE#8481, SS_EXT_DISCOUNT_AMT#8482, SS_EXT_SALES_PRICE#8483, SS_EXT_WHOLESALE_COST#8484, SS_EXT_LIST_PRICE#8485, SS_EXT_TAX#8486, SS_COUPON_AMT#8487, SS_NET_PAID#8488, SS_NET_PAID_INC_TAX#8489, SS_NET_PROFIT#8490, SS_SOLD_DATE_SK#8468]
Format: orafile
OraPlan: 00 OraTableScan TPCDS.STORE_SALES, [SS_SOLD_TIME_SK#8657, SS_ITEM_SK#8658, SS_CUSTOMER_SK#8659, SS_CDEMO_SK#8660, SS_HDEMO_SK#8661, SS_ADDR_SK#8662, SS_STORE_SK#8663, SS_PROMO_SK#8664, SS_TICKET_NUMBER#8665, SS_QUANTITY#8666, SS_WHOLESALE_COST#8667, SS_LIST_PRICE#8668, SS_SALES_PRICE#8669, SS_EXT_DISCOUNT_AMT#8670, SS_EXT_SALES_PRICE#8671, SS_EXT_WHOLESALE_COST#8672, SS_EXT_LIST_PRICE#8673, SS_EXT_TAX#8674, SS_COUPON_AMT#8675, SS_NET_PAID#8676, SS_NET_PAID_INC_TAX#8677, SS_NET_PROFIT#8678, SS_SOLD_DATE_SK#8679], [oracolumnref(SS_SOLD_TIME_SK#8657), oracolumnref(SS_ITEM_SK#8658), oracolumnref(SS_CUSTOMER_SK#8659), oracolumnref(SS_CDEMO_SK#8660), oracolumnref(SS_HDEMO_SK#8661), oracolumnref(SS_ADDR_SK#8662), oracolumnref(SS_STORE_SK#8663), oracolumnref(SS_PROMO_SK#8664), oracolumnref(SS_TICKET_NUMBER#8665), oracolumnref(SS_QUANTITY#8666), oracolumnref(SS_WHOLESALE_COST#8667), oracolumnref(SS_LIST_PRICE#8668), oracolumnref(SS_SALES_PRICE#8669), oracolumnref(SS_EXT_DISCOUNT_AMT#8670), oracolumnref(SS_EXT_SALES_PRICE#8671), oracolumnref(SS_EXT_WHOLESALE_COST#8672), oracolumnref(SS_EXT_LIST_PRICE#8673), oracolumnref(SS_EXT_TAX#8674), oracolumnref(SS_COUPON_AMT#8675), oracolumnref(SS_NET_PAID#8676), oracolumnref(SS_NET_PAID_INC_TAX#8677), oracolumnref(SS_NET_PROFIT#8678), oracolumnref(SS_SOLD_DATE_SK#8679)]
PartitionSchema: struct<SS_SOLD_DATE_SK:decimal(38,18)>
ReadSchema: struct<SS_SOLD_TIME_SK:decimal(38,18),SS_ITEM_SK:decimal(38,18),SS_CUSTOMER_SK:decimal(38,18),SS_CDEMO_SK:decimal(38,18),SS_HDEMO_SK:decimal(38,18),SS_ADDR_SK:decimal(38,18),SS_STORE_SK:decimal(38,18),SS_PROMO_SK:decimal(38,18),SS_TICKET_NUMBER:decimal(38,18),SS_QUANTITY:decimal(38,18),SS_WHOLESALE_COST:decimal(38,18),SS_LIST_PRICE:decimal(38,18),SS_SALES_PRICE:decimal(38,18),SS_EXT_DISCOUNT_AMT:decimal(38,18),SS_EXT_SALES_PRICE:decimal(38,18),SS_EXT_WHOLESALE_COST:decimal(38,18),SS_EXT_LIST_PRICE:decimal(38,18),SS_EXT_TAX:decimal(38,18),SS_COUPON_AMT:decimal(38,18),SS_NET_PAID:decimal(38,18),SS_NET_PAID_INC_TAX:decimal(38,18),SS_NET_PROFIT:decimal(38,18)>
dsKey: DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
oraPushdownSQL: select "SS_SOLD_TIME_SK", "SS_ITEM_SK", "SS_CUSTOMER_SK", "SS_CDEMO_SK", "SS_HDEMO_SK", "SS_ADDR_SK", "SS_STORE_SK", "SS_PROMO_SK", "SS_TICKET_NUMBER", "SS_QUANTITY", "SS_WHOLESALE_COST", "SS_LIST_PRICE", "SS_SALES_PRICE", "SS_EXT_DISCOUNT_AMT", "SS_EXT_SALES_PRICE", "SS_EXT_WHOLESALE_COST", "SS_EXT_LIST_PRICE", "SS_EXT_TAX", "SS_COUPON_AMT", "SS_NET_PAID", "SS_NET_PAID_INC_TAX", "SS_NET_PROFIT", "SS_SOLD_DATE_SK"
from TPCDS.STORE_SALES
where "SS_SOLD_DATE_SK" IS NOT NULL

(6) Project [codegen id : 3]
Output [2]: [SS_SOLD_DATE_SK#8468, SS_CUSTOMER_SK#8471]
Input [23]: [SS_SOLD_TIME_SK#8469, SS_ITEM_SK#8470, SS_CUSTOMER_SK#8471, SS_CDEMO_SK#8472, SS_HDEMO_SK#8473, SS_ADDR_SK#8474, SS_STORE_SK#8475, SS_PROMO_SK#8476, SS_TICKET_NUMBER#8477, SS_QUANTITY#8478, SS_WHOLESALE_COST#8479, SS_LIST_PRICE#8480, SS_SALES_PRICE#8481, SS_EXT_DISCOUNT_AMT#8482, SS_EXT_SALES_PRICE#8483, SS_EXT_WHOLESALE_COST#8484, SS_EXT_LIST_PRICE#8485, SS_EXT_TAX#8486, SS_COUPON_AMT#8487, SS_NET_PAID#8488, SS_NET_PAID_INC_TAX#8489, SS_NET_PROFIT#8490, SS_SOLD_DATE_SK#8468]

(7) Exchange
Input [2]: [SS_SOLD_DATE_SK#8468, SS_CUSTOMER_SK#8471]
Arguments: hashpartitioning(ss_sold_date_sk#8468, 5), ENSURE_REQUIREMENTS, [id=#3919]

(8) Sort [codegen id : 4]
Input [2]: [SS_SOLD_DATE_SK#8468, SS_CUSTOMER_SK#8471]
Arguments: [ss_sold_date_sk#8468 ASC NULLS FIRST], false, 0

(9) BatchScan
Output [28]: [D_DATE_SK#8491, D_DATE_ID#8492, D_DATE#8493, D_MONTH_SEQ#8494, D_WEEK_SEQ#8495, D_QUARTER_SEQ#8496, D_YEAR#8497, D_DOW#8498, D_MOY#8499, D_DOM#8500, D_QOY#8501, D_FY_YEAR#8502, D_FY_QUARTER_SEQ#8503, D_FY_WEEK_SEQ#8504, D_DAY_NAME#8505, D_QUARTER_NAME#8506, D_HOLIDAY#8507, D_WEEKEND#8508, D_FOLLOWING_HOLIDAY#8509, D_FIRST_DOM#8510, D_LAST_DOM#8511, D_SAME_DAY_LY#8512, D_SAME_DAY_LQ#8513, D_CURRENT_DAY#8514, D_CURRENT_WEEK#8515, D_CURRENT_MONTH#8516, D_CURRENT_QUARTER#8517, D_CURRENT_YEAR#8518]
Format: orafile
OraPlan: 00 OraTableScan TPCDS.DATE_DIM, [D_DATE_SK#8703, D_DATE_ID#8704, D_DATE#8705, D_MONTH_SEQ#8706, D_WEEK_SEQ#8707, D_QUARTER_SEQ#8708, D_YEAR#8709, D_DOW#8710, D_MOY#8711, D_DOM#8712, D_QOY#8713, D_FY_YEAR#8714, D_FY_QUARTER_SEQ#8715, D_FY_WEEK_SEQ#8716, D_DAY_NAME#8717, D_QUARTER_NAME#8718, D_HOLIDAY#8719, D_WEEKEND#8720, D_FOLLOWING_HOLIDAY#8721, D_FIRST_DOM#8722, D_LAST_DOM#8723, D_SAME_DAY_LY#8724, D_SAME_DAY_LQ#8725, D_CURRENT_DAY#8726, ... 4 more fields], [oracolumnref(D_DATE_SK#8703), oracolumnref(D_DATE_ID#8704), oracolumnref(D_DATE#8705), oracolumnref(D_MONTH_SEQ#8706), oracolumnref(D_WEEK_SEQ#8707), oracolumnref(D_QUARTER_SEQ#8708), oracolumnref(D_YEAR#8709), oracolumnref(D_DOW#8710), oracolumnref(D_MOY#8711), oracolumnref(D_DOM#8712), oracolumnref(D_QOY#8713), oracolumnref(D_FY_YEAR#8714), oracolumnref(D_FY_QUARTER_SEQ#8715), oracolumnref(D_FY_WEEK_SEQ#8716), oracolumnref(D_DAY_NAME#8717), oracolumnref(D_QUARTER_NAME#8718), oracolumnref(D_HOLIDAY#8719), oracolumnref(D_WEEKEND#8720), oracolumnref(D_FOLLOWING_HOLIDAY#8721), oracolumnref(D_FIRST_DOM#8722), oracolumnref(D_LAST_DOM#8723), oracolumnref(D_SAME_DAY_LY#8724), oracolumnref(D_SAME_DAY_LQ#8725), oracolumnref(D_CURRENT_DAY#8726), ... 4 more fields], orabinaryopexpression(((((isnotnull(D_YEAR#8497) AND isnotnull(D_MOY#8499)) AND (D_YEAR#8497 = 2002.000000000000000000)) AND (D_MOY#8499 >= 1.000000000000000000)) AND (D_MOY#8499 <= 4.000000000000000000)))
PartitionSchema: struct<>
ReadSchema: struct<D_DATE_SK:decimal(38,18),D_DATE_ID:string,D_DATE:date,D_MONTH_SEQ:decimal(38,18),D_WEEK_SEQ:decimal(38,18),D_QUARTER_SEQ:decimal(38,18),D_YEAR:decimal(38,18),D_DOW:decimal(38,18),D_MOY:decimal(38,18),D_DOM:decimal(38,18),D_QOY:decimal(38,18),D_FY_YEAR:decimal(38,18),D_FY_QUARTER_SEQ:decimal(38,18),D_FY_WEEK_SEQ:decimal(38,18),D_DAY_NAME:string,D_QUARTER_NAME:string,D_HOLIDAY:string,D_WEEKEND:string,D_FOLLOWING_HOLIDAY:string,D_FIRST_DOM:decimal(38,18),D_LAST_DOM:decimal(38,18),D_SAME_DAY_LY:decimal(38,18),D_SAME_DAY_LQ:decimal(38,18),D_CURRENT_DAY:string,D_CURRENT_WEEK:string,D_CURRENT_MONTH:string,D_CURRENT_QUARTER:string,D_CURRENT_YEAR:string>
dsKey: DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
oraPushdownBindValues: 2002.000000000000000000, 1.000000000000000000, 4.000000000000000000
oraPushdownSQL: select "D_DATE_SK", "D_DATE_ID", "D_DATE", "D_MONTH_SEQ", "D_WEEK_SEQ", "D_QUARTER_SEQ", "D_YEAR", "D_DOW", "D_MOY", "D_DOM", "D_QOY", "D_FY_YEAR", "D_FY_QUARTER_SEQ", "D_FY_WEEK_SEQ", "D_DAY_NAME", "D_QUARTER_NAME", "D_HOLIDAY", "D_WEEKEND", "D_FOLLOWING_HOLIDAY", "D_FIRST_DOM", "D_LAST_DOM", "D_SAME_DAY_LY", "D_SAME_DAY_LQ", "D_CURRENT_DAY", "D_CURRENT_WEEK", "D_CURRENT_MONTH", "D_CURRENT_QUARTER", "D_CURRENT_YEAR"
from TPCDS.DATE_DIM
where (((("D_YEAR" IS NOT NULL AND "D_MOY" IS NOT NULL) AND ("D_YEAR" = ?)) AND ("D_MOY" >= ?)) AND ("D_MOY" <= ?))

(10) Filter [codegen id : 5]
Input [28]: [D_DATE_SK#8491, D_DATE_ID#8492, D_DATE#8493, D_MONTH_SEQ#8494, D_WEEK_SEQ#8495, D_QUARTER_SEQ#8496, D_YEAR#8497, D_DOW#8498, D_MOY#8499, D_DOM#8500, D_QOY#8501, D_FY_YEAR#8502, D_FY_QUARTER_SEQ#8503, D_FY_WEEK_SEQ#8504, D_DAY_NAME#8505, D_QUARTER_NAME#8506, D_HOLIDAY#8507, D_WEEKEND#8508, D_FOLLOWING_HOLIDAY#8509, D_FIRST_DOM#8510, D_LAST_DOM#8511, D_SAME_DAY_LY#8512, D_SAME_DAY_LQ#8513, D_CURRENT_DAY#8514, D_CURRENT_WEEK#8515, D_CURRENT_MONTH#8516, D_CURRENT_QUARTER#8517, D_CURRENT_YEAR#8518]
Condition : ((((isnotnull(D_YEAR#8497) AND isnotnull(D_MOY#8499)) AND (D_YEAR#8497 = 2002.000000000000000000)) AND (D_MOY#8499 >= 1.000000000000000000)) AND (D_MOY#8499 <= 4.000000000000000000))

(11) Project [codegen id : 5]
Output [1]: [D_DATE_SK#8491]
Input [28]: [D_DATE_SK#8491, D_DATE_ID#8492, D_DATE#8493, D_MONTH_SEQ#8494, D_WEEK_SEQ#8495, D_QUARTER_SEQ#8496, D_YEAR#8497, D_DOW#8498, D_MOY#8499, D_DOM#8500, D_QOY#8501, D_FY_YEAR#8502, D_FY_QUARTER_SEQ#8503, D_FY_WEEK_SEQ#8504, D_DAY_NAME#8505, D_QUARTER_NAME#8506, D_HOLIDAY#8507, D_WEEKEND#8508, D_FOLLOWING_HOLIDAY#8509, D_FIRST_DOM#8510, D_LAST_DOM#8511, D_SAME_DAY_LY#8512, D_SAME_DAY_LQ#8513, D_CURRENT_DAY#8514, D_CURRENT_WEEK#8515, D_CURRENT_MONTH#8516, D_CURRENT_QUARTER#8517, D_CURRENT_YEAR#8518]

(12) Exchange
Input [1]: [D_DATE_SK#8491]
Arguments: hashpartitioning(d_date_sk#8491, 5), ENSURE_REQUIREMENTS, [id=#3928]

(13) Sort [codegen id : 6]
Input [1]: [D_DATE_SK#8491]
Arguments: [d_date_sk#8491 ASC NULLS FIRST], false, 0

(14) SortMergeJoin [codegen id : 7]
Left keys [1]: [ss_sold_date_sk#8468]
Right keys [1]: [d_date_sk#8491]
Join condition: None

(15) Project [codegen id : 7]
Output [1]: [SS_CUSTOMER_SK#8471]
Input [3]: [SS_SOLD_DATE_SK#8468, SS_CUSTOMER_SK#8471, D_DATE_SK#8491]

(16) Exchange
Input [1]: [SS_CUSTOMER_SK#8471]
Arguments: hashpartitioning(ss_customer_sk#8471, 5), ENSURE_REQUIREMENTS, [id=#3936]

(17) Sort [codegen id : 8]
Input [1]: [SS_CUSTOMER_SK#8471]
Arguments: [ss_customer_sk#8471 ASC NULLS FIRST], false, 0

(18) SortMergeJoin
Left keys [1]: [C_CUSTOMER_SK#8422]
Right keys [1]: [ss_customer_sk#8471]
Join condition: None

(19) BatchScan
Output [34]: [WS_SOLD_TIME_SK#8520, WS_SHIP_DATE_SK#8521, WS_ITEM_SK#8522, WS_BILL_CUSTOMER_SK#8523, WS_BILL_CDEMO_SK#8524, WS_BILL_HDEMO_SK#8525, WS_BILL_ADDR_SK#8526, WS_SHIP_CUSTOMER_SK#8527, WS_SHIP_CDEMO_SK#8528, WS_SHIP_HDEMO_SK#8529, WS_SHIP_ADDR_SK#8530, WS_WEB_PAGE_SK#8531, WS_WEB_SITE_SK#8532, WS_SHIP_MODE_SK#8533, WS_WAREHOUSE_SK#8534, WS_PROMO_SK#8535, WS_ORDER_NUMBER#8536, WS_QUANTITY#8537, WS_WHOLESALE_COST#8538, WS_LIST_PRICE#8539, WS_SALES_PRICE#8540, WS_EXT_DISCOUNT_AMT#8541, WS_EXT_SALES_PRICE#8542, WS_EXT_WHOLESALE_COST#8543, WS_EXT_LIST_PRICE#8544, WS_EXT_TAX#8545, WS_COUPON_AMT#8546, WS_EXT_SHIP_COST#8547, WS_NET_PAID#8548, WS_NET_PAID_INC_TAX#8549, WS_NET_PAID_INC_SHIP#8550, WS_NET_PAID_INC_SHIP_TAX#8551, WS_NET_PROFIT#8552, WS_SOLD_DATE_SK#8519]
Format: orafile
OraPlan: 00 OraTableScan TPCDS.WEB_SALES, [WS_SOLD_TIME_SK#8759, WS_SHIP_DATE_SK#8760, WS_ITEM_SK#8761, WS_BILL_CUSTOMER_SK#8762, WS_BILL_CDEMO_SK#8763, WS_BILL_HDEMO_SK#8764, WS_BILL_ADDR_SK#8765, WS_SHIP_CUSTOMER_SK#8766, WS_SHIP_CDEMO_SK#8767, WS_SHIP_HDEMO_SK#8768, WS_SHIP_ADDR_SK#8769, WS_WEB_PAGE_SK#8770, WS_WEB_SITE_SK#8771, WS_SHIP_MODE_SK#8772, WS_WAREHOUSE_SK#8773, WS_PROMO_SK#8774, WS_ORDER_NUMBER#8775, WS_QUANTITY#8776, WS_WHOLESALE_COST#8777, WS_LIST_PRICE#8778, WS_SALES_PRICE#8779, WS_EXT_DISCOUNT_AMT#8780, WS_EXT_SALES_PRICE#8781, WS_EXT_WHOLESALE_COST#8782, ... 10 more fields], [oracolumnref(WS_SOLD_TIME_SK#8759), oracolumnref(WS_SHIP_DATE_SK#8760), oracolumnref(WS_ITEM_SK#8761), oracolumnref(WS_BILL_CUSTOMER_SK#8762), oracolumnref(WS_BILL_CDEMO_SK#8763), oracolumnref(WS_BILL_HDEMO_SK#8764), oracolumnref(WS_BILL_ADDR_SK#8765), oracolumnref(WS_SHIP_CUSTOMER_SK#8766), oracolumnref(WS_SHIP_CDEMO_SK#8767), oracolumnref(WS_SHIP_HDEMO_SK#8768), oracolumnref(WS_SHIP_ADDR_SK#8769), oracolumnref(WS_WEB_PAGE_SK#8770), oracolumnref(WS_WEB_SITE_SK#8771), oracolumnref(WS_SHIP_MODE_SK#8772), oracolumnref(WS_WAREHOUSE_SK#8773), oracolumnref(WS_PROMO_SK#8774), oracolumnref(WS_ORDER_NUMBER#8775), oracolumnref(WS_QUANTITY#8776), oracolumnref(WS_WHOLESALE_COST#8777), oracolumnref(WS_LIST_PRICE#8778), oracolumnref(WS_SALES_PRICE#8779), oracolumnref(WS_EXT_DISCOUNT_AMT#8780), oracolumnref(WS_EXT_SALES_PRICE#8781), oracolumnref(WS_EXT_WHOLESALE_COST#8782), ... 10 more fields]
PartitionSchema: struct<WS_SOLD_DATE_SK:decimal(38,18)>
ReadSchema: struct<WS_SOLD_TIME_SK:decimal(38,18),WS_SHIP_DATE_SK:decimal(38,18),WS_ITEM_SK:decimal(38,18),WS_BILL_CUSTOMER_SK:decimal(38,18),WS_BILL_CDEMO_SK:decimal(38,18),WS_BILL_HDEMO_SK:decimal(38,18),WS_BILL_ADDR_SK:decimal(38,18),WS_SHIP_CUSTOMER_SK:decimal(38,18),WS_SHIP_CDEMO_SK:decimal(38,18),WS_SHIP_HDEMO_SK:decimal(38,18),WS_SHIP_ADDR_SK:decimal(38,18),WS_WEB_PAGE_SK:decimal(38,18),WS_WEB_SITE_SK:decimal(38,18),WS_SHIP_MODE_SK:decimal(38,18),WS_WAREHOUSE_SK:decimal(38,18),WS_PROMO_SK:decimal(38,18),WS_ORDER_NUMBER:decimal(38,18),WS_QUANTITY:decimal(38,18),WS_WHOLESALE_COST:decimal(38,18),WS_LIST_PRICE:decimal(38,18),WS_SALES_PRICE:decimal(38,18),WS_EXT_DISCOUNT_AMT:decimal(38,18),WS_EXT_SALES_PRICE:decimal(38,18),WS_EXT_WHOLESALE_COST:decimal(38,18),WS_EXT_LIST_PRICE:decimal(38,18),WS_EXT_TAX:decimal(38,18),WS_COUPON_AMT:decimal(38,18),WS_EXT_SHIP_COST:decimal(38,18),WS_NET_PAID:decimal(38,18),WS_NET_PAID_INC_TAX:decimal(38,18),WS_NET_PAID_INC_SHIP:decimal(38,18),WS_NET_PAID_INC_SHIP_TAX:decimal(38,18),WS_NET_PROFIT:decimal(38,18)>
dsKey: DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
oraPushdownSQL: select "WS_SOLD_TIME_SK", "WS_SHIP_DATE_SK", "WS_ITEM_SK", "WS_BILL_CUSTOMER_SK", "WS_BILL_CDEMO_SK", "WS_BILL_HDEMO_SK", "WS_BILL_ADDR_SK", "WS_SHIP_CUSTOMER_SK", "WS_SHIP_CDEMO_SK", "WS_SHIP_HDEMO_SK", "WS_SHIP_ADDR_SK", "WS_WEB_PAGE_SK", "WS_WEB_SITE_SK", "WS_SHIP_MODE_SK", "WS_WAREHOUSE_SK", "WS_PROMO_SK", "WS_ORDER_NUMBER", "WS_QUANTITY", "WS_WHOLESALE_COST", "WS_LIST_PRICE", "WS_SALES_PRICE", "WS_EXT_DISCOUNT_AMT", "WS_EXT_SALES_PRICE", "WS_EXT_WHOLESALE_COST", "WS_EXT_LIST_PRICE", "WS_EXT_TAX", "WS_COUPON_AMT", "WS_EXT_SHIP_COST", "WS_NET_PAID", "WS_NET_PAID_INC_TAX", "WS_NET_PAID_INC_SHIP", "WS_NET_PAID_INC_SHIP_TAX", "WS_NET_PROFIT", "WS_SOLD_DATE_SK"
from TPCDS.WEB_SALES
where "WS_SOLD_DATE_SK" IS NOT NULL

(20) Project [codegen id : 9]
Output [2]: [WS_SOLD_DATE_SK#8519, WS_BILL_CUSTOMER_SK#8523]
Input [34]: [WS_SOLD_TIME_SK#8520, WS_SHIP_DATE_SK#8521, WS_ITEM_SK#8522, WS_BILL_CUSTOMER_SK#8523, WS_BILL_CDEMO_SK#8524, WS_BILL_HDEMO_SK#8525, WS_BILL_ADDR_SK#8526, WS_SHIP_CUSTOMER_SK#8527, WS_SHIP_CDEMO_SK#8528, WS_SHIP_HDEMO_SK#8529, WS_SHIP_ADDR_SK#8530, WS_WEB_PAGE_SK#8531, WS_WEB_SITE_SK#8532, WS_SHIP_MODE_SK#8533, WS_WAREHOUSE_SK#8534, WS_PROMO_SK#8535, WS_ORDER_NUMBER#8536, WS_QUANTITY#8537, WS_WHOLESALE_COST#8538, WS_LIST_PRICE#8539, WS_SALES_PRICE#8540, WS_EXT_DISCOUNT_AMT#8541, WS_EXT_SALES_PRICE#8542, WS_EXT_WHOLESALE_COST#8543, WS_EXT_LIST_PRICE#8544, WS_EXT_TAX#8545, WS_COUPON_AMT#8546, WS_EXT_SHIP_COST#8547, WS_NET_PAID#8548, WS_NET_PAID_INC_TAX#8549, WS_NET_PAID_INC_SHIP#8550, WS_NET_PAID_INC_SHIP_TAX#8551, WS_NET_PROFIT#8552, WS_SOLD_DATE_SK#8519]

(21) Exchange
Input [2]: [WS_SOLD_DATE_SK#8519, WS_BILL_CUSTOMER_SK#8523]
Arguments: hashpartitioning(ws_sold_date_sk#8519, 5), ENSURE_REQUIREMENTS, [id=#3944]

(22) Sort [codegen id : 10]
Input [2]: [WS_SOLD_DATE_SK#8519, WS_BILL_CUSTOMER_SK#8523]
Arguments: [ws_sold_date_sk#8519 ASC NULLS FIRST], false, 0

(23) BatchScan
Output [28]: [D_DATE_SK#8553, D_DATE_ID#8554, D_DATE#8555, D_MONTH_SEQ#8556, D_WEEK_SEQ#8557, D_QUARTER_SEQ#8558, D_YEAR#8559, D_DOW#8560, D_MOY#8561, D_DOM#8562, D_QOY#8563, D_FY_YEAR#8564, D_FY_QUARTER_SEQ#8565, D_FY_WEEK_SEQ#8566, D_DAY_NAME#8567, D_QUARTER_NAME#8568, D_HOLIDAY#8569, D_WEEKEND#8570, D_FOLLOWING_HOLIDAY#8571, D_FIRST_DOM#8572, D_LAST_DOM#8573, D_SAME_DAY_LY#8574, D_SAME_DAY_LQ#8575, D_CURRENT_DAY#8576, D_CURRENT_WEEK#8577, D_CURRENT_MONTH#8578, D_CURRENT_QUARTER#8579, D_CURRENT_YEAR#8580]
Format: orafile
OraPlan: 00 OraTableScan TPCDS.DATE_DIM, [D_DATE_SK#8827, D_DATE_ID#8828, D_DATE#8829, D_MONTH_SEQ#8830, D_WEEK_SEQ#8831, D_QUARTER_SEQ#8832, D_YEAR#8833, D_DOW#8834, D_MOY#8835, D_DOM#8836, D_QOY#8837, D_FY_YEAR#8838, D_FY_QUARTER_SEQ#8839, D_FY_WEEK_SEQ#8840, D_DAY_NAME#8841, D_QUARTER_NAME#8842, D_HOLIDAY#8843, D_WEEKEND#8844, D_FOLLOWING_HOLIDAY#8845, D_FIRST_DOM#8846, D_LAST_DOM#8847, D_SAME_DAY_LY#8848, D_SAME_DAY_LQ#8849, D_CURRENT_DAY#8850, ... 4 more fields], [oracolumnref(D_DATE_SK#8827), oracolumnref(D_DATE_ID#8828), oracolumnref(D_DATE#8829), oracolumnref(D_MONTH_SEQ#8830), oracolumnref(D_WEEK_SEQ#8831), oracolumnref(D_QUARTER_SEQ#8832), oracolumnref(D_YEAR#8833), oracolumnref(D_DOW#8834), oracolumnref(D_MOY#8835), oracolumnref(D_DOM#8836), oracolumnref(D_QOY#8837), oracolumnref(D_FY_YEAR#8838), oracolumnref(D_FY_QUARTER_SEQ#8839), oracolumnref(D_FY_WEEK_SEQ#8840), oracolumnref(D_DAY_NAME#8841), oracolumnref(D_QUARTER_NAME#8842), oracolumnref(D_HOLIDAY#8843), oracolumnref(D_WEEKEND#8844), oracolumnref(D_FOLLOWING_HOLIDAY#8845), oracolumnref(D_FIRST_DOM#8846), oracolumnref(D_LAST_DOM#8847), oracolumnref(D_SAME_DAY_LY#8848), oracolumnref(D_SAME_DAY_LQ#8849), oracolumnref(D_CURRENT_DAY#8850), ... 4 more fields], orabinaryopexpression(((((isnotnull(D_YEAR#8559) AND isnotnull(D_MOY#8561)) AND (D_YEAR#8559 = 2002.000000000000000000)) AND (D_MOY#8561 >= 1.000000000000000000)) AND (D_MOY#8561 <= 4.000000000000000000)))
PartitionSchema: struct<>
ReadSchema: struct<D_DATE_SK:decimal(38,18),D_DATE_ID:string,D_DATE:date,D_MONTH_SEQ:decimal(38,18),D_WEEK_SEQ:decimal(38,18),D_QUARTER_SEQ:decimal(38,18),D_YEAR:decimal(38,18),D_DOW:decimal(38,18),D_MOY:decimal(38,18),D_DOM:decimal(38,18),D_QOY:decimal(38,18),D_FY_YEAR:decimal(38,18),D_FY_QUARTER_SEQ:decimal(38,18),D_FY_WEEK_SEQ:decimal(38,18),D_DAY_NAME:string,D_QUARTER_NAME:string,D_HOLIDAY:string,D_WEEKEND:string,D_FOLLOWING_HOLIDAY:string,D_FIRST_DOM:decimal(38,18),D_LAST_DOM:decimal(38,18),D_SAME_DAY_LY:decimal(38,18),D_SAME_DAY_LQ:decimal(38,18),D_CURRENT_DAY:string,D_CURRENT_WEEK:string,D_CURRENT_MONTH:string,D_CURRENT_QUARTER:string,D_CURRENT_YEAR:string>
dsKey: DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
oraPushdownBindValues: 2002.000000000000000000, 1.000000000000000000, 4.000000000000000000
oraPushdownSQL: select "D_DATE_SK", "D_DATE_ID", "D_DATE", "D_MONTH_SEQ", "D_WEEK_SEQ", "D_QUARTER_SEQ", "D_YEAR", "D_DOW", "D_MOY", "D_DOM", "D_QOY", "D_FY_YEAR", "D_FY_QUARTER_SEQ", "D_FY_WEEK_SEQ", "D_DAY_NAME", "D_QUARTER_NAME", "D_HOLIDAY", "D_WEEKEND", "D_FOLLOWING_HOLIDAY", "D_FIRST_DOM", "D_LAST_DOM", "D_SAME_DAY_LY", "D_SAME_DAY_LQ", "D_CURRENT_DAY", "D_CURRENT_WEEK", "D_CURRENT_MONTH", "D_CURRENT_QUARTER", "D_CURRENT_YEAR"
from TPCDS.DATE_DIM
where (((("D_YEAR" IS NOT NULL AND "D_MOY" IS NOT NULL) AND ("D_YEAR" = ?)) AND ("D_MOY" >= ?)) AND ("D_MOY" <= ?))

(24) Filter [codegen id : 11]
Input [28]: [D_DATE_SK#8553, D_DATE_ID#8554, D_DATE#8555, D_MONTH_SEQ#8556, D_WEEK_SEQ#8557, D_QUARTER_SEQ#8558, D_YEAR#8559, D_DOW#8560, D_MOY#8561, D_DOM#8562, D_QOY#8563, D_FY_YEAR#8564, D_FY_QUARTER_SEQ#8565, D_FY_WEEK_SEQ#8566, D_DAY_NAME#8567, D_QUARTER_NAME#8568, D_HOLIDAY#8569, D_WEEKEND#8570, D_FOLLOWING_HOLIDAY#8571, D_FIRST_DOM#8572, D_LAST_DOM#8573, D_SAME_DAY_LY#8574, D_SAME_DAY_LQ#8575, D_CURRENT_DAY#8576, D_CURRENT_WEEK#8577, D_CURRENT_MONTH#8578, D_CURRENT_QUARTER#8579, D_CURRENT_YEAR#8580]
Condition : ((((isnotnull(D_YEAR#8559) AND isnotnull(D_MOY#8561)) AND (D_YEAR#8559 = 2002.000000000000000000)) AND (D_MOY#8561 >= 1.000000000000000000)) AND (D_MOY#8561 <= 4.000000000000000000))

(25) Project [codegen id : 11]
Output [1]: [D_DATE_SK#8553]
Input [28]: [D_DATE_SK#8553, D_DATE_ID#8554, D_DATE#8555, D_MONTH_SEQ#8556, D_WEEK_SEQ#8557, D_QUARTER_SEQ#8558, D_YEAR#8559, D_DOW#8560, D_MOY#8561, D_DOM#8562, D_QOY#8563, D_FY_YEAR#8564, D_FY_QUARTER_SEQ#8565, D_FY_WEEK_SEQ#8566, D_DAY_NAME#8567, D_QUARTER_NAME#8568, D_HOLIDAY#8569, D_WEEKEND#8570, D_FOLLOWING_HOLIDAY#8571, D_FIRST_DOM#8572, D_LAST_DOM#8573, D_SAME_DAY_LY#8574, D_SAME_DAY_LQ#8575, D_CURRENT_DAY#8576, D_CURRENT_WEEK#8577, D_CURRENT_MONTH#8578, D_CURRENT_QUARTER#8579, D_CURRENT_YEAR#8580]

(26) Exchange
Input [1]: [D_DATE_SK#8553]
Arguments: hashpartitioning(d_date_sk#8553, 5), ENSURE_REQUIREMENTS, [id=#3953]

(27) Sort [codegen id : 12]
Input [1]: [D_DATE_SK#8553]
Arguments: [d_date_sk#8553 ASC NULLS FIRST], false, 0

(28) SortMergeJoin [codegen id : 13]
Left keys [1]: [ws_sold_date_sk#8519]
Right keys [1]: [d_date_sk#8553]
Join condition: None

(29) Project [codegen id : 13]
Output [1]: [WS_BILL_CUSTOMER_SK#8523]
Input [3]: [WS_SOLD_DATE_SK#8519, WS_BILL_CUSTOMER_SK#8523, D_DATE_SK#8553]

(30) Exchange
Input [1]: [WS_BILL_CUSTOMER_SK#8523]
Arguments: hashpartitioning(ws_bill_customer_sk#8523, 5), ENSURE_REQUIREMENTS, [id=#3961]

(31) Sort [codegen id : 14]
Input [1]: [WS_BILL_CUSTOMER_SK#8523]
Arguments: [ws_bill_customer_sk#8523 ASC NULLS FIRST], false, 0

(32) SortMergeJoin
Left keys [1]: [C_CUSTOMER_SK#8422]
Right keys [1]: [ws_bill_customer_sk#8523]
Join condition: None

(33) BatchScan
Output [34]: [CS_SOLD_TIME_SK#8582, CS_SHIP_DATE_SK#8583, CS_BILL_CUSTOMER_SK#8584, CS_BILL_CDEMO_SK#8585, CS_BILL_HDEMO_SK#8586, CS_BILL_ADDR_SK#8587, CS_SHIP_CUSTOMER_SK#8588, CS_SHIP_CDEMO_SK#8589, CS_SHIP_HDEMO_SK#8590, CS_SHIP_ADDR_SK#8591, CS_CALL_CENTER_SK#8592, CS_CATALOG_PAGE_SK#8593, CS_SHIP_MODE_SK#8594, CS_WAREHOUSE_SK#8595, CS_ITEM_SK#8596, CS_PROMO_SK#8597, CS_ORDER_NUMBER#8598, CS_QUANTITY#8599, CS_WHOLESALE_COST#8600, CS_LIST_PRICE#8601, CS_SALES_PRICE#8602, CS_EXT_DISCOUNT_AMT#8603, CS_EXT_SALES_PRICE#8604, CS_EXT_WHOLESALE_COST#8605, CS_EXT_LIST_PRICE#8606, CS_EXT_TAX#8607, CS_COUPON_AMT#8608, CS_EXT_SHIP_COST#8609, CS_NET_PAID#8610, CS_NET_PAID_INC_TAX#8611, CS_NET_PAID_INC_SHIP#8612, CS_NET_PAID_INC_SHIP_TAX#8613, CS_NET_PROFIT#8614, CS_SOLD_DATE_SK#8581]
Format: orafile
OraPlan: 00 OraTableScan TPCDS.CATALOG_SALES, [CS_SOLD_TIME_SK#8883, CS_SHIP_DATE_SK#8884, CS_BILL_CUSTOMER_SK#8885, CS_BILL_CDEMO_SK#8886, CS_BILL_HDEMO_SK#8887, CS_BILL_ADDR_SK#8888, CS_SHIP_CUSTOMER_SK#8889, CS_SHIP_CDEMO_SK#8890, CS_SHIP_HDEMO_SK#8891, CS_SHIP_ADDR_SK#8892, CS_CALL_CENTER_SK#8893, CS_CATALOG_PAGE_SK#8894, CS_SHIP_MODE_SK#8895, CS_WAREHOUSE_SK#8896, CS_ITEM_SK#8897, CS_PROMO_SK#8898, CS_ORDER_NUMBER#8899, CS_QUANTITY#8900, CS_WHOLESALE_COST#8901, CS_LIST_PRICE#8902, CS_SALES_PRICE#8903, CS_EXT_DISCOUNT_AMT#8904, CS_EXT_SALES_PRICE#8905, CS_EXT_WHOLESALE_COST#8906, ... 10 more fields], [oracolumnref(CS_SOLD_TIME_SK#8883), oracolumnref(CS_SHIP_DATE_SK#8884), oracolumnref(CS_BILL_CUSTOMER_SK#8885), oracolumnref(CS_BILL_CDEMO_SK#8886), oracolumnref(CS_BILL_HDEMO_SK#8887), oracolumnref(CS_BILL_ADDR_SK#8888), oracolumnref(CS_SHIP_CUSTOMER_SK#8889), oracolumnref(CS_SHIP_CDEMO_SK#8890), oracolumnref(CS_SHIP_HDEMO_SK#8891), oracolumnref(CS_SHIP_ADDR_SK#8892), oracolumnref(CS_CALL_CENTER_SK#8893), oracolumnref(CS_CATALOG_PAGE_SK#8894), oracolumnref(CS_SHIP_MODE_SK#8895), oracolumnref(CS_WAREHOUSE_SK#8896), oracolumnref(CS_ITEM_SK#8897), oracolumnref(CS_PROMO_SK#8898), oracolumnref(CS_ORDER_NUMBER#8899), oracolumnref(CS_QUANTITY#8900), oracolumnref(CS_WHOLESALE_COST#8901), oracolumnref(CS_LIST_PRICE#8902), oracolumnref(CS_SALES_PRICE#8903), oracolumnref(CS_EXT_DISCOUNT_AMT#8904), oracolumnref(CS_EXT_SALES_PRICE#8905), oracolumnref(CS_EXT_WHOLESALE_COST#8906), ... 10 more fields]
PartitionSchema: struct<CS_SOLD_DATE_SK:decimal(38,18)>
ReadSchema: struct<CS_SOLD_TIME_SK:decimal(38,18),CS_SHIP_DATE_SK:decimal(38,18),CS_BILL_CUSTOMER_SK:decimal(38,18),CS_BILL_CDEMO_SK:decimal(38,18),CS_BILL_HDEMO_SK:decimal(38,18),CS_BILL_ADDR_SK:decimal(38,18),CS_SHIP_CUSTOMER_SK:decimal(38,18),CS_SHIP_CDEMO_SK:decimal(38,18),CS_SHIP_HDEMO_SK:decimal(38,18),CS_SHIP_ADDR_SK:decimal(38,18),CS_CALL_CENTER_SK:decimal(38,18),CS_CATALOG_PAGE_SK:decimal(38,18),CS_SHIP_MODE_SK:decimal(38,18),CS_WAREHOUSE_SK:decimal(38,18),CS_ITEM_SK:decimal(38,18),CS_PROMO_SK:decimal(38,18),CS_ORDER_NUMBER:decimal(38,18),CS_QUANTITY:decimal(38,18),CS_WHOLESALE_COST:decimal(38,18),CS_LIST_PRICE:decimal(38,18),CS_SALES_PRICE:decimal(38,18),CS_EXT_DISCOUNT_AMT:decimal(38,18),CS_EXT_SALES_PRICE:decimal(38,18),CS_EXT_WHOLESALE_COST:decimal(38,18),CS_EXT_LIST_PRICE:decimal(38,18),CS_EXT_TAX:decimal(38,18),CS_COUPON_AMT:decimal(38,18),CS_EXT_SHIP_COST:decimal(38,18),CS_NET_PAID:decimal(38,18),CS_NET_PAID_INC_TAX:decimal(38,18),CS_NET_PAID_INC_SHIP:decimal(38,18),CS_NET_PAID_INC_SHIP_TAX:decimal(38,18),CS_NET_PROFIT:decimal(38,18)>
dsKey: DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
oraPushdownSQL: select "CS_SOLD_TIME_SK", "CS_SHIP_DATE_SK", "CS_BILL_CUSTOMER_SK", "CS_BILL_CDEMO_SK", "CS_BILL_HDEMO_SK", "CS_BILL_ADDR_SK", "CS_SHIP_CUSTOMER_SK", "CS_SHIP_CDEMO_SK", "CS_SHIP_HDEMO_SK", "CS_SHIP_ADDR_SK", "CS_CALL_CENTER_SK", "CS_CATALOG_PAGE_SK", "CS_SHIP_MODE_SK", "CS_WAREHOUSE_SK", "CS_ITEM_SK", "CS_PROMO_SK", "CS_ORDER_NUMBER", "CS_QUANTITY", "CS_WHOLESALE_COST", "CS_LIST_PRICE", "CS_SALES_PRICE", "CS_EXT_DISCOUNT_AMT", "CS_EXT_SALES_PRICE", "CS_EXT_WHOLESALE_COST", "CS_EXT_LIST_PRICE", "CS_EXT_TAX", "CS_COUPON_AMT", "CS_EXT_SHIP_COST", "CS_NET_PAID", "CS_NET_PAID_INC_TAX", "CS_NET_PAID_INC_SHIP", "CS_NET_PAID_INC_SHIP_TAX", "CS_NET_PROFIT", "CS_SOLD_DATE_SK"
from TPCDS.CATALOG_SALES
where "CS_SOLD_DATE_SK" IS NOT NULL

(34) Project [codegen id : 15]
Output [2]: [CS_SOLD_DATE_SK#8581, CS_SHIP_CUSTOMER_SK#8588]
Input [34]: [CS_SOLD_TIME_SK#8582, CS_SHIP_DATE_SK#8583, CS_BILL_CUSTOMER_SK#8584, CS_BILL_CDEMO_SK#8585, CS_BILL_HDEMO_SK#8586, CS_BILL_ADDR_SK#8587, CS_SHIP_CUSTOMER_SK#8588, CS_SHIP_CDEMO_SK#8589, CS_SHIP_HDEMO_SK#8590, CS_SHIP_ADDR_SK#8591, CS_CALL_CENTER_SK#8592, CS_CATALOG_PAGE_SK#8593, CS_SHIP_MODE_SK#8594, CS_WAREHOUSE_SK#8595, CS_ITEM_SK#8596, CS_PROMO_SK#8597, CS_ORDER_NUMBER#8598, CS_QUANTITY#8599, CS_WHOLESALE_COST#8600, CS_LIST_PRICE#8601, CS_SALES_PRICE#8602, CS_EXT_DISCOUNT_AMT#8603, CS_EXT_SALES_PRICE#8604, CS_EXT_WHOLESALE_COST#8605, CS_EXT_LIST_PRICE#8606, CS_EXT_TAX#8607, CS_COUPON_AMT#8608, CS_EXT_SHIP_COST#8609, CS_NET_PAID#8610, CS_NET_PAID_INC_TAX#8611, CS_NET_PAID_INC_SHIP#8612, CS_NET_PAID_INC_SHIP_TAX#8613, CS_NET_PROFIT#8614, CS_SOLD_DATE_SK#8581]

(35) Exchange
Input [2]: [CS_SOLD_DATE_SK#8581, CS_SHIP_CUSTOMER_SK#8588]
Arguments: hashpartitioning(cs_sold_date_sk#8581, 5), ENSURE_REQUIREMENTS, [id=#3969]

(36) Sort [codegen id : 16]
Input [2]: [CS_SOLD_DATE_SK#8581, CS_SHIP_CUSTOMER_SK#8588]
Arguments: [cs_sold_date_sk#8581 ASC NULLS FIRST], false, 0

(37) BatchScan
Output [28]: [D_DATE_SK#8615, D_DATE_ID#8616, D_DATE#8617, D_MONTH_SEQ#8618, D_WEEK_SEQ#8619, D_QUARTER_SEQ#8620, D_YEAR#8621, D_DOW#8622, D_MOY#8623, D_DOM#8624, D_QOY#8625, D_FY_YEAR#8626, D_FY_QUARTER_SEQ#8627, D_FY_WEEK_SEQ#8628, D_DAY_NAME#8629, D_QUARTER_NAME#8630, D_HOLIDAY#8631, D_WEEKEND#8632, D_FOLLOWING_HOLIDAY#8633, D_FIRST_DOM#8634, D_LAST_DOM#8635, D_SAME_DAY_LY#8636, D_SAME_DAY_LQ#8637, D_CURRENT_DAY#8638, D_CURRENT_WEEK#8639, D_CURRENT_MONTH#8640, D_CURRENT_QUARTER#8641, D_CURRENT_YEAR#8642]
Format: orafile
OraPlan: 00 OraTableScan TPCDS.DATE_DIM, [D_DATE_SK#8951, D_DATE_ID#8952, D_DATE#8953, D_MONTH_SEQ#8954, D_WEEK_SEQ#8955, D_QUARTER_SEQ#8956, D_YEAR#8957, D_DOW#8958, D_MOY#8959, D_DOM#8960, D_QOY#8961, D_FY_YEAR#8962, D_FY_QUARTER_SEQ#8963, D_FY_WEEK_SEQ#8964, D_DAY_NAME#8965, D_QUARTER_NAME#8966, D_HOLIDAY#8967, D_WEEKEND#8968, D_FOLLOWING_HOLIDAY#8969, D_FIRST_DOM#8970, D_LAST_DOM#8971, D_SAME_DAY_LY#8972, D_SAME_DAY_LQ#8973, D_CURRENT_DAY#8974, ... 4 more fields], [oracolumnref(D_DATE_SK#8951), oracolumnref(D_DATE_ID#8952), oracolumnref(D_DATE#8953), oracolumnref(D_MONTH_SEQ#8954), oracolumnref(D_WEEK_SEQ#8955), oracolumnref(D_QUARTER_SEQ#8956), oracolumnref(D_YEAR#8957), oracolumnref(D_DOW#8958), oracolumnref(D_MOY#8959), oracolumnref(D_DOM#8960), oracolumnref(D_QOY#8961), oracolumnref(D_FY_YEAR#8962), oracolumnref(D_FY_QUARTER_SEQ#8963), oracolumnref(D_FY_WEEK_SEQ#8964), oracolumnref(D_DAY_NAME#8965), oracolumnref(D_QUARTER_NAME#8966), oracolumnref(D_HOLIDAY#8967), oracolumnref(D_WEEKEND#8968), oracolumnref(D_FOLLOWING_HOLIDAY#8969), oracolumnref(D_FIRST_DOM#8970), oracolumnref(D_LAST_DOM#8971), oracolumnref(D_SAME_DAY_LY#8972), oracolumnref(D_SAME_DAY_LQ#8973), oracolumnref(D_CURRENT_DAY#8974), ... 4 more fields], orabinaryopexpression(((((isnotnull(D_YEAR#8621) AND isnotnull(D_MOY#8623)) AND (D_YEAR#8621 = 2002.000000000000000000)) AND (D_MOY#8623 >= 1.000000000000000000)) AND (D_MOY#8623 <= 4.000000000000000000)))
PartitionSchema: struct<>
ReadSchema: struct<D_DATE_SK:decimal(38,18),D_DATE_ID:string,D_DATE:date,D_MONTH_SEQ:decimal(38,18),D_WEEK_SEQ:decimal(38,18),D_QUARTER_SEQ:decimal(38,18),D_YEAR:decimal(38,18),D_DOW:decimal(38,18),D_MOY:decimal(38,18),D_DOM:decimal(38,18),D_QOY:decimal(38,18),D_FY_YEAR:decimal(38,18),D_FY_QUARTER_SEQ:decimal(38,18),D_FY_WEEK_SEQ:decimal(38,18),D_DAY_NAME:string,D_QUARTER_NAME:string,D_HOLIDAY:string,D_WEEKEND:string,D_FOLLOWING_HOLIDAY:string,D_FIRST_DOM:decimal(38,18),D_LAST_DOM:decimal(38,18),D_SAME_DAY_LY:decimal(38,18),D_SAME_DAY_LQ:decimal(38,18),D_CURRENT_DAY:string,D_CURRENT_WEEK:string,D_CURRENT_MONTH:string,D_CURRENT_QUARTER:string,D_CURRENT_YEAR:string>
dsKey: DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
oraPushdownBindValues: 2002.000000000000000000, 1.000000000000000000, 4.000000000000000000
oraPushdownSQL: select "D_DATE_SK", "D_DATE_ID", "D_DATE", "D_MONTH_SEQ", "D_WEEK_SEQ", "D_QUARTER_SEQ", "D_YEAR", "D_DOW", "D_MOY", "D_DOM", "D_QOY", "D_FY_YEAR", "D_FY_QUARTER_SEQ", "D_FY_WEEK_SEQ", "D_DAY_NAME", "D_QUARTER_NAME", "D_HOLIDAY", "D_WEEKEND", "D_FOLLOWING_HOLIDAY", "D_FIRST_DOM", "D_LAST_DOM", "D_SAME_DAY_LY", "D_SAME_DAY_LQ", "D_CURRENT_DAY", "D_CURRENT_WEEK", "D_CURRENT_MONTH", "D_CURRENT_QUARTER", "D_CURRENT_YEAR"
from TPCDS.DATE_DIM
where (((("D_YEAR" IS NOT NULL AND "D_MOY" IS NOT NULL) AND ("D_YEAR" = ?)) AND ("D_MOY" >= ?)) AND ("D_MOY" <= ?))

(38) Filter [codegen id : 17]
Input [28]: [D_DATE_SK#8615, D_DATE_ID#8616, D_DATE#8617, D_MONTH_SEQ#8618, D_WEEK_SEQ#8619, D_QUARTER_SEQ#8620, D_YEAR#8621, D_DOW#8622, D_MOY#8623, D_DOM#8624, D_QOY#8625, D_FY_YEAR#8626, D_FY_QUARTER_SEQ#8627, D_FY_WEEK_SEQ#8628, D_DAY_NAME#8629, D_QUARTER_NAME#8630, D_HOLIDAY#8631, D_WEEKEND#8632, D_FOLLOWING_HOLIDAY#8633, D_FIRST_DOM#8634, D_LAST_DOM#8635, D_SAME_DAY_LY#8636, D_SAME_DAY_LQ#8637, D_CURRENT_DAY#8638, D_CURRENT_WEEK#8639, D_CURRENT_MONTH#8640, D_CURRENT_QUARTER#8641, D_CURRENT_YEAR#8642]
Condition : ((((isnotnull(D_YEAR#8621) AND isnotnull(D_MOY#8623)) AND (D_YEAR#8621 = 2002.000000000000000000)) AND (D_MOY#8623 >= 1.000000000000000000)) AND (D_MOY#8623 <= 4.000000000000000000))

(39) Project [codegen id : 17]
Output [1]: [D_DATE_SK#8615]
Input [28]: [D_DATE_SK#8615, D_DATE_ID#8616, D_DATE#8617, D_MONTH_SEQ#8618, D_WEEK_SEQ#8619, D_QUARTER_SEQ#8620, D_YEAR#8621, D_DOW#8622, D_MOY#8623, D_DOM#8624, D_QOY#8625, D_FY_YEAR#8626, D_FY_QUARTER_SEQ#8627, D_FY_WEEK_SEQ#8628, D_DAY_NAME#8629, D_QUARTER_NAME#8630, D_HOLIDAY#8631, D_WEEKEND#8632, D_FOLLOWING_HOLIDAY#8633, D_FIRST_DOM#8634, D_LAST_DOM#8635, D_SAME_DAY_LY#8636, D_SAME_DAY_LQ#8637, D_CURRENT_DAY#8638, D_CURRENT_WEEK#8639, D_CURRENT_MONTH#8640, D_CURRENT_QUARTER#8641, D_CURRENT_YEAR#8642]

(40) Exchange
Input [1]: [D_DATE_SK#8615]
Arguments: hashpartitioning(d_date_sk#8615, 5), ENSURE_REQUIREMENTS, [id=#3978]

(41) Sort [codegen id : 18]
Input [1]: [D_DATE_SK#8615]
Arguments: [d_date_sk#8615 ASC NULLS FIRST], false, 0

(42) SortMergeJoin [codegen id : 19]
Left keys [1]: [cs_sold_date_sk#8581]
Right keys [1]: [d_date_sk#8615]
Join condition: None

(43) Project [codegen id : 19]
Output [1]: [CS_SHIP_CUSTOMER_SK#8588]
Input [3]: [CS_SOLD_DATE_SK#8581, CS_SHIP_CUSTOMER_SK#8588, D_DATE_SK#8615]

(44) Exchange
Input [1]: [CS_SHIP_CUSTOMER_SK#8588]
Arguments: hashpartitioning(cs_ship_customer_sk#8588, 5), ENSURE_REQUIREMENTS, [id=#3986]

(45) Sort [codegen id : 20]
Input [1]: [CS_SHIP_CUSTOMER_SK#8588]
Arguments: [cs_ship_customer_sk#8588 ASC NULLS FIRST], false, 0

(46) SortMergeJoin
Left keys [1]: [C_CUSTOMER_SK#8422]
Right keys [1]: [cs_ship_customer_sk#8588]
Join condition: None

(47) Filter [codegen id : 21]
Input [5]: [C_CUSTOMER_SK#8422, C_CURRENT_CDEMO_SK#8424, C_CURRENT_ADDR_SK#8426, exists#9035, exists#9036]
Condition : (exists#9035 OR exists#9036)

(48) Project [codegen id : 21]
Output [2]: [C_CURRENT_CDEMO_SK#8424, C_CURRENT_ADDR_SK#8426]
Input [5]: [C_CUSTOMER_SK#8422, C_CURRENT_CDEMO_SK#8424, C_CURRENT_ADDR_SK#8426, exists#9035, exists#9036]

(49) Exchange
Input [2]: [C_CURRENT_CDEMO_SK#8424, C_CURRENT_ADDR_SK#8426]
Arguments: hashpartitioning(c_current_addr_sk#8426, 5), ENSURE_REQUIREMENTS, [id=#3995]

(50) Sort [codegen id : 22]
Input [2]: [C_CURRENT_CDEMO_SK#8424, C_CURRENT_ADDR_SK#8426]
Arguments: [c_current_addr_sk#8426 ASC NULLS FIRST], false, 0

(51) BatchScan
Output [2]: [CA_ADDRESS_SK#8440, CA_COUNTY#8447]
Format: orafile
OraPlan: 00 OraTableScan TPCDS.CUSTOMER_ADDRESS, [CA_ADDRESS_SK#9013, CA_COUNTY#9014], [oracolumnref(CA_ADDRESS_SK#9013), oracolumnref(CA_COUNTY#9014)], orain(CA_COUNTY#8447 IN (Rush County,Toole County,Jefferson County,Dona Ana County,La Porte County))
PartitionSchema: struct<>
ReadSchema: struct<CA_ADDRESS_SK:decimal(38,18),CA_COUNTY:string>
dsKey: DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
oraPushdownBindValues: Rush County, Toole County, Jefferson County, Dona Ana County, La Porte County
oraPushdownSQL: select "CA_ADDRESS_SK", "CA_COUNTY"
from TPCDS.CUSTOMER_ADDRESS
where "CA_COUNTY" IN ( ?, ?, ?, ?, ? )

(52) Filter [codegen id : 23]
Input [2]: [CA_ADDRESS_SK#8440, CA_COUNTY#8447]
Condition : CA_COUNTY#8447 IN (Rush County,Toole County,Jefferson County,Dona Ana County,La Porte County)

(53) Project [codegen id : 23]
Output [1]: [CA_ADDRESS_SK#8440]
Input [2]: [CA_ADDRESS_SK#8440, CA_COUNTY#8447]

(54) Exchange
Input [1]: [CA_ADDRESS_SK#8440]
Arguments: hashpartitioning(ca_address_sk#8440, 5), ENSURE_REQUIREMENTS, [id=#4004]

(55) Sort [codegen id : 24]
Input [1]: [CA_ADDRESS_SK#8440]
Arguments: [ca_address_sk#8440 ASC NULLS FIRST], false, 0

(56) SortMergeJoin [codegen id : 25]
Left keys [1]: [c_current_addr_sk#8426]
Right keys [1]: [ca_address_sk#8440]
Join condition: None

(57) Project [codegen id : 25]
Output [1]: [C_CURRENT_CDEMO_SK#8424]
Input [3]: [C_CURRENT_CDEMO_SK#8424, C_CURRENT_ADDR_SK#8426, CA_ADDRESS_SK#8440]

(58) Exchange
Input [1]: [C_CURRENT_CDEMO_SK#8424]
Arguments: hashpartitioning(c_current_cdemo_sk#8424, 5), ENSURE_REQUIREMENTS, [id=#4012]

(59) Sort [codegen id : 26]
Input [1]: [C_CURRENT_CDEMO_SK#8424]
Arguments: [c_current_cdemo_sk#8424 ASC NULLS FIRST], false, 0

(60) BatchScan
Output [9]: [CD_DEMO_SK#8453, CD_GENDER#8454, CD_MARITAL_STATUS#8455, CD_EDUCATION_STATUS#8456, CD_PURCHASE_ESTIMATE#8457, CD_CREDIT_RATING#8458, CD_DEP_COUNT#8459, CD_DEP_EMPLOYED_COUNT#8460, CD_DEP_COLLEGE_COUNT#8461]
Format: orafile
OraPlan: 00 OraTableScan TPCDS.CUSTOMER_DEMOGRAPHICS, [CD_DEMO_SK#9017, CD_GENDER#9018, CD_MARITAL_STATUS#9019, CD_EDUCATION_STATUS#9020, CD_PURCHASE_ESTIMATE#9021, CD_CREDIT_RATING#9022, CD_DEP_COUNT#9023, CD_DEP_EMPLOYED_COUNT#9024, CD_DEP_COLLEGE_COUNT#9025], [oracolumnref(CD_DEMO_SK#9017), oracolumnref(CD_GENDER#9018), oracolumnref(CD_MARITAL_STATUS#9019), oracolumnref(CD_EDUCATION_STATUS#9020), oracolumnref(CD_PURCHASE_ESTIMATE#9021), oracolumnref(CD_CREDIT_RATING#9022), oracolumnref(CD_DEP_COUNT#9023), oracolumnref(CD_DEP_EMPLOYED_COUNT#9024), oracolumnref(CD_DEP_COLLEGE_COUNT#9025)]
PartitionSchema: struct<>
ReadSchema: struct<CD_DEMO_SK:decimal(38,18),CD_GENDER:string,CD_MARITAL_STATUS:string,CD_EDUCATION_STATUS:string,CD_PURCHASE_ESTIMATE:decimal(38,18),CD_CREDIT_RATING:string,CD_DEP_COUNT:decimal(38,18),CD_DEP_EMPLOYED_COUNT:decimal(38,18),CD_DEP_COLLEGE_COUNT:decimal(38,18)>
dsKey: DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
oraPushdownSQL: select "CD_DEMO_SK", "CD_GENDER", "CD_MARITAL_STATUS", "CD_EDUCATION_STATUS", "CD_PURCHASE_ESTIMATE", "CD_CREDIT_RATING", "CD_DEP_COUNT", "CD_DEP_EMPLOYED_COUNT", "CD_DEP_COLLEGE_COUNT"
from TPCDS.CUSTOMER_DEMOGRAPHICS

(61) Project [codegen id : 27]
Output [9]: [CD_DEMO_SK#8453, CD_GENDER#8454, CD_MARITAL_STATUS#8455, CD_EDUCATION_STATUS#8456, CD_PURCHASE_ESTIMATE#8457, CD_CREDIT_RATING#8458, CD_DEP_COUNT#8459, CD_DEP_EMPLOYED_COUNT#8460, CD_DEP_COLLEGE_COUNT#8461]
Input [9]: [CD_DEMO_SK#8453, CD_GENDER#8454, CD_MARITAL_STATUS#8455, CD_EDUCATION_STATUS#8456, CD_PURCHASE_ESTIMATE#8457, CD_CREDIT_RATING#8458, CD_DEP_COUNT#8459, CD_DEP_EMPLOYED_COUNT#8460, CD_DEP_COLLEGE_COUNT#8461]

(62) Exchange
Input [9]: [CD_DEMO_SK#8453, CD_GENDER#8454, CD_MARITAL_STATUS#8455, CD_EDUCATION_STATUS#8456, CD_PURCHASE_ESTIMATE#8457, CD_CREDIT_RATING#8458, CD_DEP_COUNT#8459, CD_DEP_EMPLOYED_COUNT#8460, CD_DEP_COLLEGE_COUNT#8461]
Arguments: hashpartitioning(cd_demo_sk#8453, 5), ENSURE_REQUIREMENTS, [id=#4020]

(63) Sort [codegen id : 28]
Input [9]: [CD_DEMO_SK#8453, CD_GENDER#8454, CD_MARITAL_STATUS#8455, CD_EDUCATION_STATUS#8456, CD_PURCHASE_ESTIMATE#8457, CD_CREDIT_RATING#8458, CD_DEP_COUNT#8459, CD_DEP_EMPLOYED_COUNT#8460, CD_DEP_COLLEGE_COUNT#8461]
Arguments: [cd_demo_sk#8453 ASC NULLS FIRST], false, 0

(64) SortMergeJoin [codegen id : 29]
Left keys [1]: [c_current_cdemo_sk#8424]
Right keys [1]: [cd_demo_sk#8453]
Join condition: None

(65) Project [codegen id : 29]
Output [8]: [CD_GENDER#8454, CD_MARITAL_STATUS#8455, CD_EDUCATION_STATUS#8456, CD_PURCHASE_ESTIMATE#8457, CD_CREDIT_RATING#8458, CD_DEP_COUNT#8459, CD_DEP_EMPLOYED_COUNT#8460, CD_DEP_COLLEGE_COUNT#8461]
Input [10]: [C_CURRENT_CDEMO_SK#8424, CD_DEMO_SK#8453, CD_GENDER#8454, CD_MARITAL_STATUS#8455, CD_EDUCATION_STATUS#8456, CD_PURCHASE_ESTIMATE#8457, CD_CREDIT_RATING#8458, CD_DEP_COUNT#8459, CD_DEP_EMPLOYED_COUNT#8460, CD_DEP_COLLEGE_COUNT#8461]

(66) HashAggregate [codegen id : 29]
Input [8]: [CD_GENDER#8454, CD_MARITAL_STATUS#8455, CD_EDUCATION_STATUS#8456, CD_PURCHASE_ESTIMATE#8457, CD_CREDIT_RATING#8458, CD_DEP_COUNT#8459, CD_DEP_EMPLOYED_COUNT#8460, CD_DEP_COLLEGE_COUNT#8461]
Keys [8]: [cd_gender#8454, cd_marital_status#8455, cd_education_status#8456, cd_purchase_estimate#8457, cd_credit_rating#8458, cd_dep_count#8459, cd_dep_employed_count#8460, cd_dep_college_count#8461]
Functions [1]: [partial_count(1)]
Aggregate Attributes [1]: [count#9037L]
Results [9]: [cd_gender#8454, cd_marital_status#8455, cd_education_status#8456, cd_purchase_estimate#8457, cd_credit_rating#8458, cd_dep_count#8459, cd_dep_employed_count#8460, cd_dep_college_count#8461, count#9038L]

(67) Exchange
Input [9]: [cd_gender#8454, cd_marital_status#8455, cd_education_status#8456, cd_purchase_estimate#8457, cd_credit_rating#8458, cd_dep_count#8459, cd_dep_employed_count#8460, cd_dep_college_count#8461, count#9038L]
Arguments: hashpartitioning(cd_gender#8454, cd_marital_status#8455, cd_education_status#8456, cd_purchase_estimate#8457, cd_credit_rating#8458, cd_dep_count#8459, cd_dep_employed_count#8460, cd_dep_college_count#8461, 5), ENSURE_REQUIREMENTS, [id=#4029]

(68) HashAggregate [codegen id : 30]
Input [9]: [cd_gender#8454, cd_marital_status#8455, cd_education_status#8456, cd_purchase_estimate#8457, cd_credit_rating#8458, cd_dep_count#8459, cd_dep_employed_count#8460, cd_dep_college_count#8461, count#9038L]
Keys [8]: [cd_gender#8454, cd_marital_status#8455, cd_education_status#8456, cd_purchase_estimate#8457, cd_credit_rating#8458, cd_dep_count#8459, cd_dep_employed_count#8460, cd_dep_college_count#8461]
Functions [1]: [count(1)]
Aggregate Attributes [1]: [count(1)#8462L]
Results [14]: [cd_gender#8454, cd_marital_status#8455, cd_education_status#8456, count(1)#8462L AS cnt1#8416L, cd_purchase_estimate#8457, count(1)#8462L AS cnt2#8417L, cd_credit_rating#8458, count(1)#8462L AS cnt3#8418L, cd_dep_count#8459, count(1)#8462L AS cnt4#8419L, cd_dep_employed_count#8460, count(1)#8462L AS cnt5#8420L, cd_dep_college_count#8461, count(1)#8462L AS cnt6#8421L]

(69) TakeOrderedAndProject
Input [14]: [cd_gender#8454, cd_marital_status#8455, cd_education_status#8456, cnt1#8416L, cd_purchase_estimate#8457, cnt2#8417L, cd_credit_rating#8458, cnt3#8418L, cd_dep_count#8459, cnt4#8419L, cd_dep_employed_count#8460, cnt5#8420L, cd_dep_college_count#8461, cnt6#8421L]
Arguments: 100, [cd_gender#8454 ASC NULLS FIRST, cd_marital_status#8455 ASC NULLS FIRST, cd_education_status#8456 ASC NULLS FIRST, cd_purchase_estimate#8457 ASC NULLS FIRST, cd_credit_rating#8458 ASC NULLS FIRST, cd_dep_count#8459 ASC NULLS FIRST, cd_dep_employed_count#8460 ASC NULLS FIRST, cd_dep_college_count#8461 ASC NULLS FIRST], [cd_gender#8454, cd_marital_status#8455, cd_education_status#8456, cnt1#8416L, cd_purchase_estimate#8457, cnt2#8417L, cd_credit_rating#8458, cnt3#8418L, cd_dep_count#8459, cnt4#8419L, cd_dep_employed_count#8460, cnt5#8420L, cd_dep_college_count#8461, cnt6#8421L]


Query q11

Spark SQL

with year_total as (
 select c_customer_id customer_id
       ,c_first_name customer_first_name
       ,c_last_name customer_last_name
       ,c_preferred_cust_flag customer_preferred_cust_flag
       ,c_birth_country customer_birth_country
       ,c_login customer_login
       ,c_email_address customer_email_address
       ,d_year dyear
       ,sum(ss_ext_list_price-ss_ext_discount_amt) year_total
       ,'s' sale_type
 from customer
     ,store_sales
     ,date_dim
 where c_customer_sk = ss_customer_sk
   and ss_sold_date_sk = d_date_sk
 group by c_customer_id
         ,c_first_name
         ,c_last_name
         ,c_preferred_cust_flag
         ,c_birth_country
         ,c_login
         ,c_email_address
         ,d_year
 union all
 select c_customer_id customer_id
       ,c_first_name customer_first_name
       ,c_last_name customer_last_name
       ,c_preferred_cust_flag customer_preferred_cust_flag
       ,c_birth_country customer_birth_country
       ,c_login customer_login
       ,c_email_address customer_email_address
       ,d_year dyear
       ,sum(ws_ext_list_price-ws_ext_discount_amt) year_total
       ,'w' sale_type
 from customer
     ,web_sales
     ,date_dim
 where c_customer_sk = ws_bill_customer_sk
   and ws_sold_date_sk = d_date_sk
 group by c_customer_id
         ,c_first_name
         ,c_last_name
         ,c_preferred_cust_flag
         ,c_birth_country
         ,c_login
         ,c_email_address
         ,d_year
         )
  select
                  t_s_secyear.customer_id
                 ,t_s_secyear.customer_first_name
                 ,t_s_secyear.customer_last_name
                 ,t_s_secyear.customer_preferred_cust_flag
 from year_total t_s_firstyear
     ,year_total t_s_secyear
     ,year_total t_w_firstyear
     ,year_total t_w_secyear
 where t_s_secyear.customer_id = t_s_firstyear.customer_id
         and t_s_firstyear.customer_id = t_w_secyear.customer_id
         and t_s_firstyear.customer_id = t_w_firstyear.customer_id
         and t_s_firstyear.sale_type = 's'
         and t_w_firstyear.sale_type = 'w'
         and t_s_secyear.sale_type = 's'
         and t_w_secyear.sale_type = 'w'
         and t_s_firstyear.dyear = 2001
         and t_s_secyear.dyear = 2001+1
         and t_w_firstyear.dyear = 2001
         and t_w_secyear.dyear = 2001+1
         and t_s_firstyear.year_total > 0
         and t_w_firstyear.year_total > 0
         and case when t_w_firstyear.year_total > 0 then t_w_secyear.year_total / t_w_firstyear.year_total else 0.0 end
             > case when t_s_firstyear.year_total > 0 then t_s_secyear.year_total / t_s_firstyear.year_total else 0.0 end
 order by t_s_secyear.customer_id
         ,t_s_secyear.customer_first_name
         ,t_s_secyear.customer_last_name
         ,t_s_secyear.customer_preferred_cust_flag
 limit 100;
 

Spark Plan with Pushdown turned on

Project (1)
+- BatchScan (2)

(2) BatchScan
Oracle Instance:
   DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
Pushdown Oracle SQL:
select "customer_id", "customer_first_name", "customer_last_name", "customer_preferred_cust_flag"
from ( select "sparkora_1"."customer_id", "customer_first_name", "customer_last_name", "customer_preferred_cust_flag"
from ( select "C_CUSTOMER_ID" AS "customer_id", SUM((cast("SS_EXT_LIST_PRICE" as NUMBER(38, 17)) - cast("SS_EXT_DISCOUNT_AMT" as NUMBER(38, 17)))) AS "year_total"
from TPCDS.CUSTOMER  join TPCDS.STORE_SALES  on ("C_CUSTOMER_SK" = "SS_CUSTOMER_SK") join TPCDS.DATE_DIM  on ("SS_SOLD_DATE_SK" = "D_DATE_SK")
where (("SS_CUSTOMER_SK" IS NOT NULL AND "SS_SOLD_DATE_SK" IS NOT NULL) AND ("D_YEAR" IS NOT NULL AND ("D_YEAR" = 2001.000000000000000000)))
group by "C_CUSTOMER_ID", "C_FIRST_NAME", "C_LAST_NAME", "C_PREFERRED_CUST_FLAG", "C_BIRTH_COUNTRY", "C_LOGIN", "C_EMAIL_ADDRESS", "D_YEAR" ) "sparkora_0" join ( select "C_CUSTOMER_ID" AS "customer_id", "C_FIRST_NAME" AS "customer_first_name", "C_LAST_NAME" AS "customer_last_name", "C_PREFERRED_CUST_FLAG" AS "customer_preferred_cust_flag", SUM((cast("SS_EXT_LIST_PRICE" as NUMBER(38, 17)) - cast("SS_EXT_DISCOUNT_AMT" as NUMBER(38, 17)))) AS "year_total"
from TPCDS.CUSTOMER  join TPCDS.STORE_SALES  on ("C_CUSTOMER_SK" = "SS_CUSTOMER_SK") join TPCDS.DATE_DIM  on ("SS_SOLD_DATE_SK" = "D_DATE_SK")
where (("SS_CUSTOMER_SK" IS NOT NULL AND "SS_SOLD_DATE_SK" IS NOT NULL) AND ("D_YEAR" IS NOT NULL AND ("D_YEAR" = 2002.000000000000000000)))
group by "C_CUSTOMER_ID", "C_FIRST_NAME", "C_LAST_NAME", "C_PREFERRED_CUST_FLAG", "C_BIRTH_COUNTRY", "C_LOGIN", "C_EMAIL_ADDRESS", "D_YEAR" ) "sparkora_1" on ("sparkora_0"."customer_id" = "sparkora_1"."customer_id") join ( select "customer_id" AS "customer_id", "year_total" AS "year_total"
from ( select "C_CUSTOMER_ID" AS "customer_id", SUM((cast("WS_EXT_LIST_PRICE" as NUMBER(38, 17)) - cast("WS_EXT_DISCOUNT_AMT" as NUMBER(38, 17)))) AS "year_total"
from TPCDS.CUSTOMER  join TPCDS.WEB_SALES  on ("C_CUSTOMER_SK" = "WS_BILL_CUSTOMER_SK") join TPCDS.DATE_DIM  on ("WS_SOLD_DATE_SK" = "D_DATE_SK")
where (("WS_BILL_CUSTOMER_SK" IS NOT NULL AND "WS_SOLD_DATE_SK" IS NOT NULL) AND ("D_YEAR" IS NOT NULL AND ("D_YEAR" = 2001.000000000000000000)))
group by "C_CUSTOMER_ID", "C_FIRST_NAME", "C_LAST_NAME", "C_PREFERRED_CUST_FLAG", "C_BIRTH_COUNTRY", "C_LOGIN", "C_EMAIL_ADDRESS", "D_YEAR" ) 
where ("year_total" IS NOT NULL AND ("year_total" > 0E-17)) ) "sparkora_2" on ("sparkora_0"."customer_id" = "sparkora_2"."customer_id") join ( select "C_CUSTOMER_ID" AS "customer_id", SUM((cast("WS_EXT_LIST_PRICE" as NUMBER(38, 17)) - cast("WS_EXT_DISCOUNT_AMT" as NUMBER(38, 17)))) AS "year_total"
from TPCDS.CUSTOMER  join TPCDS.WEB_SALES  on ("C_CUSTOMER_SK" = "WS_BILL_CUSTOMER_SK") join TPCDS.DATE_DIM  on ("WS_SOLD_DATE_SK" = "D_DATE_SK")
where (("WS_BILL_CUSTOMER_SK" IS NOT NULL AND "WS_SOLD_DATE_SK" IS NOT NULL) AND ("D_YEAR" IS NOT NULL AND ("D_YEAR" = 2002.000000000000000000)))
group by "C_CUSTOMER_ID", "C_FIRST_NAME", "C_LAST_NAME", "C_PREFERRED_CUST_FLAG", "C_BIRTH_COUNTRY", "C_LOGIN", "C_EMAIL_ADDRESS", "D_YEAR" ) "sparkora_3" on (("sparkora_0"."customer_id" = "sparkora_3"."customer_id") AND (CASE WHEN ("sparkora_2"."year_total" > 0E-17) THEN ("sparkora_3"."year_total" / "sparkora_2"."year_total") ELSE 0.000000 END > CASE WHEN ("sparkora_0"."year_total" > 0E-17) THEN ("sparkora_1"."year_total" / "sparkora_0"."year_total") ELSE 0.000000 END))
where ("sparkora_0"."year_total" IS NOT NULL AND ("sparkora_0"."year_total" > 0E-17))
order by "sparkora_1"."customer_id" ASC NULLS FIRST, "customer_first_name" ASC NULLS FIRST, "customer_last_name" ASC NULLS FIRST, "customer_preferred_cust_flag" ASC NULLS FIRST ) 
where rownum <= 100
Pushdown Oracle SQL, oracle plan stats estimates:
rowCount = 60, bytes=4500
Pushdown Oracle SQL, Query Splitting details:
Query is not split

Spark Plan with Pushdown turned off

== Physical Plan ==
TakeOrderedAndProject (101)
+- * Project (100)
   +- * SortMergeJoin Inner (99)
      :- * Project (75)
      :  +- * SortMergeJoin Inner (74)
      :     :- * SortMergeJoin Inner (48)
      :     :  :- * Sort (24)
      :     :  :  +- Exchange (23)
      :     :  :     +- * Filter (22)
      :     :  :        +- * HashAggregate (21)
      :     :  :           +- Exchange (20)
      :     :  :              +- * HashAggregate (19)
      :     :  :                 +- * Project (18)
      :     :  :                    +- * SortMergeJoin Inner (17)
      :     :  :                       :- * Sort (12)
      :     :  :                       :  +- Exchange (11)
      :     :  :                       :     +- * Project (10)
      :     :  :                       :        +- * SortMergeJoin Inner (9)
      :     :  :                       :           :- * Sort (4)
      :     :  :                       :           :  +- Exchange (3)
      :     :  :                       :           :     +- * Project (2)
      :     :  :                       :           :        +- BatchScan (1)
      :     :  :                       :           +- * Sort (8)
      :     :  :                       :              +- Exchange (7)
      :     :  :                       :                 +- * Filter (6)
      :     :  :                       :                    +- BatchScan (5)
      :     :  :                       +- * Sort (16)
      :     :  :                          +- Exchange (15)
      :     :  :                             +- * Filter (14)
      :     :  :                                +- BatchScan (13)
      :     :  +- * Sort (47)
      :     :     +- Exchange (46)
      :     :        +- * HashAggregate (45)
      :     :           +- Exchange (44)
      :     :              +- * HashAggregate (43)
      :     :                 +- * Project (42)
      :     :                    +- * SortMergeJoin Inner (41)
      :     :                       :- * Sort (36)
      :     :                       :  +- Exchange (35)
      :     :                       :     +- * Project (34)
      :     :                       :        +- * SortMergeJoin Inner (33)
      :     :                       :           :- * Sort (28)
      :     :                       :           :  +- Exchange (27)
      :     :                       :           :     +- * Project (26)
      :     :                       :           :        +- BatchScan (25)
      :     :                       :           +- * Sort (32)
      :     :                       :              +- Exchange (31)
      :     :                       :                 +- * Filter (30)
      :     :                       :                    +- BatchScan (29)
      :     :                       +- * Sort (40)
      :     :                          +- Exchange (39)
      :     :                             +- * Filter (38)
      :     :                                +- BatchScan (37)
      :     +- * Sort (73)
      :        +- Exchange (72)
      :           +- * Project (71)
      :              +- * Filter (70)
      :                 +- * HashAggregate (69)
      :                    +- Exchange (68)
      :                       +- * HashAggregate (67)
      :                          +- * Project (66)
      :                             +- * SortMergeJoin Inner (65)
      :                                :- * Sort (60)
      :                                :  +- Exchange (59)
      :                                :     +- * Project (58)
      :                                :        +- * SortMergeJoin Inner (57)
      :                                :           :- * Sort (52)
      :                                :           :  +- Exchange (51)
      :                                :           :     +- * Project (50)
      :                                :           :        +- BatchScan (49)
      :                                :           +- * Sort (56)
      :                                :              +- Exchange (55)
      :                                :                 +- * Filter (54)
      :                                :                    +- BatchScan (53)
      :                                +- * Sort (64)
      :                                   +- Exchange (63)
      :                                      +- * Filter (62)
      :                                         +- BatchScan (61)
      +- * Sort (98)
         +- Exchange (97)
            +- * HashAggregate (96)
               +- Exchange (95)
                  +- * HashAggregate (94)
                     +- * Project (93)
                        +- * SortMergeJoin Inner (92)
                           :- * Sort (87)
                           :  +- Exchange (86)
                           :     +- * Project (85)
                           :        +- * SortMergeJoin Inner (84)
                           :           :- * Sort (79)
                           :           :  +- Exchange (78)
                           :           :     +- * Project (77)
                           :           :        +- BatchScan (76)
                           :           +- * Sort (83)
                           :              +- Exchange (82)
                           :                 +- * Filter (81)
                           :                    +- BatchScan (80)
                           +- * Sort (91)
                              +- Exchange (90)
                                 +- * Filter (89)
                                    +- BatchScan (88)


(1) BatchScan
Output [8]: [C_CUSTOMER_SK#9692, C_CUSTOMER_ID#9693, C_FIRST_NAME#9700, C_LAST_NAME#9701, C_PREFERRED_CUST_FLAG#9702, C_BIRTH_COUNTRY#9706, C_LOGIN#9707, C_EMAIL_ADDRESS#9708]
Format: orafile
OraPlan: 00 OraTableScan TPCDS.CUSTOMER, [C_CUSTOMER_SK#10330, C_CUSTOMER_ID#10331, C_FIRST_NAME#10332, C_LAST_NAME#10333, C_PREFERRED_CUST_FLAG#10334, C_BIRTH_COUNTRY#10335, C_LOGIN#10336, C_EMAIL_ADDRESS#10337], [oracolumnref(C_CUSTOMER_SK#10330), oracolumnref(C_CUSTOMER_ID#10331), oracolumnref(C_FIRST_NAME#10332), oracolumnref(C_LAST_NAME#10333), oracolumnref(C_PREFERRED_CUST_FLAG#10334), oracolumnref(C_BIRTH_COUNTRY#10335), oracolumnref(C_LOGIN#10336), oracolumnref(C_EMAIL_ADDRESS#10337)]
PartitionSchema: struct<>
ReadSchema: struct<C_CUSTOMER_SK:decimal(38,18),C_CUSTOMER_ID:string,C_FIRST_NAME:string,C_LAST_NAME:string,C_PREFERRED_CUST_FLAG:string,C_BIRTH_COUNTRY:string,C_LOGIN:string,C_EMAIL_ADDRESS:string>
dsKey: DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
oraPushdownSQL: select "C_CUSTOMER_SK", "C_CUSTOMER_ID", "C_FIRST_NAME", "C_LAST_NAME", "C_PREFERRED_CUST_FLAG", "C_BIRTH_COUNTRY", "C_LOGIN", "C_EMAIL_ADDRESS"
from TPCDS.CUSTOMER

(2) Project [codegen id : 1]
Output [8]: [C_CUSTOMER_SK#9692, C_CUSTOMER_ID#9693, C_FIRST_NAME#9700, C_LAST_NAME#9701, C_PREFERRED_CUST_FLAG#9702, C_BIRTH_COUNTRY#9706, C_LOGIN#9707, C_EMAIL_ADDRESS#9708]
Input [8]: [C_CUSTOMER_SK#9692, C_CUSTOMER_ID#9693, C_FIRST_NAME#9700, C_LAST_NAME#9701, C_PREFERRED_CUST_FLAG#9702, C_BIRTH_COUNTRY#9706, C_LOGIN#9707, C_EMAIL_ADDRESS#9708]

(3) Exchange
Input [8]: [C_CUSTOMER_SK#9692, C_CUSTOMER_ID#9693, C_FIRST_NAME#9700, C_LAST_NAME#9701, C_PREFERRED_CUST_FLAG#9702, C_BIRTH_COUNTRY#9706, C_LOGIN#9707, C_EMAIL_ADDRESS#9708]
Arguments: hashpartitioning(c_customer_sk#9692, 5), ENSURE_REQUIREMENTS, [id=#4460]

(4) Sort [codegen id : 2]
Input [8]: [C_CUSTOMER_SK#9692, C_CUSTOMER_ID#9693, C_FIRST_NAME#9700, C_LAST_NAME#9701, C_PREFERRED_CUST_FLAG#9702, C_BIRTH_COUNTRY#9706, C_LOGIN#9707, C_EMAIL_ADDRESS#9708]
Arguments: [c_customer_sk#9692 ASC NULLS FIRST], false, 0

(5) BatchScan
Output [4]: [SS_CUSTOMER_SK#9713, SS_EXT_DISCOUNT_AMT#9724, SS_EXT_LIST_PRICE#9727, SS_SOLD_DATE_SK#9710]
Format: orafile
OraPlan: 00 OraTableScan TPCDS.STORE_SALES, [SS_CUSTOMER_SK#10346, SS_EXT_DISCOUNT_AMT#10347, SS_EXT_LIST_PRICE#10348, SS_SOLD_DATE_SK#10349], [oracolumnref(SS_CUSTOMER_SK#10346), oracolumnref(SS_EXT_DISCOUNT_AMT#10347), oracolumnref(SS_EXT_LIST_PRICE#10348), oracolumnref(SS_SOLD_DATE_SK#10349)], orapostfixunaryopexpression(isnotnull(SS_CUSTOMER_SK#9713))
PartitionSchema: struct<SS_SOLD_DATE_SK:decimal(38,18)>
ReadSchema: struct<SS_CUSTOMER_SK:decimal(38,18),SS_EXT_DISCOUNT_AMT:decimal(38,18),SS_EXT_LIST_PRICE:decimal(38,18)>
dsKey: DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
oraPushdownSQL: select "SS_CUSTOMER_SK", "SS_EXT_DISCOUNT_AMT", "SS_EXT_LIST_PRICE", "SS_SOLD_DATE_SK"
from TPCDS.STORE_SALES
where "SS_CUSTOMER_SK" IS NOT NULL and "SS_SOLD_DATE_SK" IS NOT NULL

(6) Filter [codegen id : 3]
Input [4]: [SS_CUSTOMER_SK#9713, SS_EXT_DISCOUNT_AMT#9724, SS_EXT_LIST_PRICE#9727, SS_SOLD_DATE_SK#9710]
Condition : isnotnull(SS_CUSTOMER_SK#9713)

(7) Exchange
Input [4]: [SS_CUSTOMER_SK#9713, SS_EXT_DISCOUNT_AMT#9724, SS_EXT_LIST_PRICE#9727, SS_SOLD_DATE_SK#9710]
Arguments: hashpartitioning(ss_customer_sk#9713, 5), ENSURE_REQUIREMENTS, [id=#4468]

(8) Sort [codegen id : 4]
Input [4]: [SS_CUSTOMER_SK#9713, SS_EXT_DISCOUNT_AMT#9724, SS_EXT_LIST_PRICE#9727, SS_SOLD_DATE_SK#9710]
Arguments: [ss_customer_sk#9713 ASC NULLS FIRST], false, 0

(9) SortMergeJoin [codegen id : 5]
Left keys [1]: [c_customer_sk#9692]
Right keys [1]: [ss_customer_sk#9713]
Join condition: None

(10) Project [codegen id : 5]
Output [10]: [C_CUSTOMER_ID#9693, C_FIRST_NAME#9700, C_LAST_NAME#9701, C_PREFERRED_CUST_FLAG#9702, C_BIRTH_COUNTRY#9706, C_LOGIN#9707, C_EMAIL_ADDRESS#9708, SS_SOLD_DATE_SK#9710, SS_EXT_DISCOUNT_AMT#9724, SS_EXT_LIST_PRICE#9727]
Input [12]: [C_CUSTOMER_SK#9692, C_CUSTOMER_ID#9693, C_FIRST_NAME#9700, C_LAST_NAME#9701, C_PREFERRED_CUST_FLAG#9702, C_BIRTH_COUNTRY#9706, C_LOGIN#9707, C_EMAIL_ADDRESS#9708, SS_CUSTOMER_SK#9713, SS_EXT_DISCOUNT_AMT#9724, SS_EXT_LIST_PRICE#9727, SS_SOLD_DATE_SK#9710]

(11) Exchange
Input [10]: [C_CUSTOMER_ID#9693, C_FIRST_NAME#9700, C_LAST_NAME#9701, C_PREFERRED_CUST_FLAG#9702, C_BIRTH_COUNTRY#9706, C_LOGIN#9707, C_EMAIL_ADDRESS#9708, SS_SOLD_DATE_SK#9710, SS_EXT_DISCOUNT_AMT#9724, SS_EXT_LIST_PRICE#9727]
Arguments: hashpartitioning(ss_sold_date_sk#9710, 5), ENSURE_REQUIREMENTS, [id=#4476]

(12) Sort [codegen id : 6]
Input [10]: [C_CUSTOMER_ID#9693, C_FIRST_NAME#9700, C_LAST_NAME#9701, C_PREFERRED_CUST_FLAG#9702, C_BIRTH_COUNTRY#9706, C_LOGIN#9707, C_EMAIL_ADDRESS#9708, SS_SOLD_DATE_SK#9710, SS_EXT_DISCOUNT_AMT#9724, SS_EXT_LIST_PRICE#9727]
Arguments: [ss_sold_date_sk#9710 ASC NULLS FIRST], false, 0

(13) BatchScan
Output [2]: [D_DATE_SK#9733, D_YEAR#9739]
Format: orafile
OraPlan: 00 OraTableScan TPCDS.DATE_DIM, [D_DATE_SK#10354, D_YEAR#10355], [oracolumnref(D_DATE_SK#10354), oracolumnref(D_YEAR#10355)], orabinaryopexpression((isnotnull(D_YEAR#9739) AND (D_YEAR#9739 = 2001.000000000000000000)))
PartitionSchema: struct<>
ReadSchema: struct<D_DATE_SK:decimal(38,18),D_YEAR:decimal(38,18)>
dsKey: DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
oraPushdownBindValues: 2001.000000000000000000
oraPushdownSQL: select "D_DATE_SK", "D_YEAR"
from TPCDS.DATE_DIM
where ("D_YEAR" IS NOT NULL AND ("D_YEAR" = ?))

(14) Filter [codegen id : 7]
Input [2]: [D_DATE_SK#9733, D_YEAR#9739]
Condition : (isnotnull(D_YEAR#9739) AND (D_YEAR#9739 = 2001.000000000000000000))

(15) Exchange
Input [2]: [D_DATE_SK#9733, D_YEAR#9739]
Arguments: hashpartitioning(d_date_sk#9733, 5), ENSURE_REQUIREMENTS, [id=#4484]

(16) Sort [codegen id : 8]
Input [2]: [D_DATE_SK#9733, D_YEAR#9739]
Arguments: [d_date_sk#9733 ASC NULLS FIRST], false, 0

(17) SortMergeJoin [codegen id : 9]
Left keys [1]: [ss_sold_date_sk#9710]
Right keys [1]: [d_date_sk#9733]
Join condition: None

(18) Project [codegen id : 9]
Output [10]: [C_CUSTOMER_ID#9693, C_FIRST_NAME#9700, C_LAST_NAME#9701, C_PREFERRED_CUST_FLAG#9702, C_BIRTH_COUNTRY#9706, C_LOGIN#9707, C_EMAIL_ADDRESS#9708, SS_EXT_DISCOUNT_AMT#9724, SS_EXT_LIST_PRICE#9727, D_YEAR#9739]
Input [12]: [C_CUSTOMER_ID#9693, C_FIRST_NAME#9700, C_LAST_NAME#9701, C_PREFERRED_CUST_FLAG#9702, C_BIRTH_COUNTRY#9706, C_LOGIN#9707, C_EMAIL_ADDRESS#9708, SS_SOLD_DATE_SK#9710, SS_EXT_DISCOUNT_AMT#9724, SS_EXT_LIST_PRICE#9727, D_DATE_SK#9733, D_YEAR#9739]

(19) HashAggregate [codegen id : 9]
Input [10]: [C_CUSTOMER_ID#9693, C_FIRST_NAME#9700, C_LAST_NAME#9701, C_PREFERRED_CUST_FLAG#9702, C_BIRTH_COUNTRY#9706, C_LOGIN#9707, C_EMAIL_ADDRESS#9708, SS_EXT_DISCOUNT_AMT#9724, SS_EXT_LIST_PRICE#9727, D_YEAR#9739]
Keys [8]: [c_customer_id#9693, c_first_name#9700, c_last_name#9701, c_preferred_cust_flag#9702, c_birth_country#9706, c_login#9707, c_email_address#9708, d_year#9739]
Functions [1]: [partial_sum(CheckOverflow((promote_precision(cast(ss_ext_list_price#9727 as decimal(38,17))) - promote_precision(cast(ss_ext_discount_amt#9724 as decimal(38,17)))), DecimalType(38,17), true))]
Aggregate Attributes [2]: [sum#10490, isEmpty#10491]
Results [10]: [c_customer_id#9693, c_first_name#9700, c_last_name#9701, c_preferred_cust_flag#9702, c_birth_country#9706, c_login#9707, c_email_address#9708, d_year#9739, sum#10492, isEmpty#10493]

(20) Exchange
Input [10]: [c_customer_id#9693, c_first_name#9700, c_last_name#9701, c_preferred_cust_flag#9702, c_birth_country#9706, c_login#9707, c_email_address#9708, d_year#9739, sum#10492, isEmpty#10493]
Arguments: hashpartitioning(c_customer_id#9693, c_first_name#9700, c_last_name#9701, c_preferred_cust_flag#9702, c_birth_country#9706, c_login#9707, c_email_address#9708, d_year#9739, 5), ENSURE_REQUIREMENTS, [id=#4493]

(21) HashAggregate [codegen id : 10]
Input [10]: [c_customer_id#9693, c_first_name#9700, c_last_name#9701, c_preferred_cust_flag#9702, c_birth_country#9706, c_login#9707, c_email_address#9708, d_year#9739, sum#10492, isEmpty#10493]
Keys [8]: [c_customer_id#9693, c_first_name#9700, c_last_name#9701, c_preferred_cust_flag#9702, c_birth_country#9706, c_login#9707, c_email_address#9708, d_year#9739]
Functions [1]: [sum(CheckOverflow((promote_precision(cast(ss_ext_list_price#9727 as decimal(38,17))) - promote_precision(cast(ss_ext_discount_amt#9724 as decimal(38,17)))), DecimalType(38,17), true))]
Aggregate Attributes [1]: [sum(CheckOverflow((promote_precision(cast(ss_ext_list_price#9727 as decimal(38,17))) - promote_precision(cast(ss_ext_discount_amt#9724 as decimal(38,17)))), DecimalType(38,17), true))#10288]
Results [2]: [c_customer_id#9693 AS customer_id#9672, sum(CheckOverflow((promote_precision(cast(ss_ext_list_price#9727 as decimal(38,17))) - promote_precision(cast(ss_ext_discount_amt#9724 as decimal(38,17)))), DecimalType(38,17), true))#10288 AS year_total#9680]

(22) Filter [codegen id : 10]
Input [2]: [customer_id#9672, year_total#9680]
Condition : (isnotnull(year_total#9680) AND (year_total#9680 > 0E-17))

(23) Exchange
Input [2]: [customer_id#9672, year_total#9680]
Arguments: hashpartitioning(customer_id#9672, 5), ENSURE_REQUIREMENTS, [id=#4498]

(24) Sort [codegen id : 11]
Input [2]: [customer_id#9672, year_total#9680]
Arguments: [customer_id#9672 ASC NULLS FIRST], false, 0

(25) BatchScan
Output [8]: [C_CUSTOMER_SK#9841, C_CUSTOMER_ID#9842, C_FIRST_NAME#9849, C_LAST_NAME#9850, C_PREFERRED_CUST_FLAG#9851, C_BIRTH_COUNTRY#9855, C_LOGIN#9856, C_EMAIL_ADDRESS#9857]
Format: orafile
OraPlan: 00 OraTableScan TPCDS.CUSTOMER, [C_CUSTOMER_SK#10370, C_CUSTOMER_ID#10371, C_FIRST_NAME#10372, C_LAST_NAME#10373, C_PREFERRED_CUST_FLAG#10374, C_BIRTH_COUNTRY#10375, C_LOGIN#10376, C_EMAIL_ADDRESS#10377], [oracolumnref(C_CUSTOMER_SK#10370), oracolumnref(C_CUSTOMER_ID#10371), oracolumnref(C_FIRST_NAME#10372), oracolumnref(C_LAST_NAME#10373), oracolumnref(C_PREFERRED_CUST_FLAG#10374), oracolumnref(C_BIRTH_COUNTRY#10375), oracolumnref(C_LOGIN#10376), oracolumnref(C_EMAIL_ADDRESS#10377)]
PartitionSchema: struct<>
ReadSchema: struct<C_CUSTOMER_SK:decimal(38,18),C_CUSTOMER_ID:string,C_FIRST_NAME:string,C_LAST_NAME:string,C_PREFERRED_CUST_FLAG:string,C_BIRTH_COUNTRY:string,C_LOGIN:string,C_EMAIL_ADDRESS:string>
dsKey: DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
oraPushdownSQL: select "C_CUSTOMER_SK", "C_CUSTOMER_ID", "C_FIRST_NAME", "C_LAST_NAME", "C_PREFERRED_CUST_FLAG", "C_BIRTH_COUNTRY", "C_LOGIN", "C_EMAIL_ADDRESS"
from TPCDS.CUSTOMER

(26) Project [codegen id : 12]
Output [8]: [C_CUSTOMER_SK#9841, C_CUSTOMER_ID#9842, C_FIRST_NAME#9849, C_LAST_NAME#9850, C_PREFERRED_CUST_FLAG#9851, C_BIRTH_COUNTRY#9855, C_LOGIN#9856, C_EMAIL_ADDRESS#9857]
Input [8]: [C_CUSTOMER_SK#9841, C_CUSTOMER_ID#9842, C_FIRST_NAME#9849, C_LAST_NAME#9850, C_PREFERRED_CUST_FLAG#9851, C_BIRTH_COUNTRY#9855, C_LOGIN#9856, C_EMAIL_ADDRESS#9857]

(27) Exchange
Input [8]: [C_CUSTOMER_SK#9841, C_CUSTOMER_ID#9842, C_FIRST_NAME#9849, C_LAST_NAME#9850, C_PREFERRED_CUST_FLAG#9851, C_BIRTH_COUNTRY#9855, C_LOGIN#9856, C_EMAIL_ADDRESS#9857]
Arguments: hashpartitioning(c_customer_sk#9841, 5), ENSURE_REQUIREMENTS, [id=#4506]

(28) Sort [codegen id : 13]
Input [8]: [C_CUSTOMER_SK#9841, C_CUSTOMER_ID#9842, C_FIRST_NAME#9849, C_LAST_NAME#9850, C_PREFERRED_CUST_FLAG#9851, C_BIRTH_COUNTRY#9855, C_LOGIN#9856, C_EMAIL_ADDRESS#9857]
Arguments: [c_customer_sk#9841 ASC NULLS FIRST], false, 0

(29) BatchScan
Output [4]: [SS_CUSTOMER_SK#9862, SS_EXT_DISCOUNT_AMT#9873, SS_EXT_LIST_PRICE#9876, SS_SOLD_DATE_SK#9859]
Format: orafile
OraPlan: 00 OraTableScan TPCDS.STORE_SALES, [SS_CUSTOMER_SK#10386, SS_EXT_DISCOUNT_AMT#10387, SS_EXT_LIST_PRICE#10388, SS_SOLD_DATE_SK#10389], [oracolumnref(SS_CUSTOMER_SK#10386), oracolumnref(SS_EXT_DISCOUNT_AMT#10387), oracolumnref(SS_EXT_LIST_PRICE#10388), oracolumnref(SS_SOLD_DATE_SK#10389)], orapostfixunaryopexpression(isnotnull(SS_CUSTOMER_SK#9862))
PartitionSchema: struct<SS_SOLD_DATE_SK:decimal(38,18)>
ReadSchema: struct<SS_CUSTOMER_SK:decimal(38,18),SS_EXT_DISCOUNT_AMT:decimal(38,18),SS_EXT_LIST_PRICE:decimal(38,18)>
dsKey: DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
oraPushdownSQL: select "SS_CUSTOMER_SK", "SS_EXT_DISCOUNT_AMT", "SS_EXT_LIST_PRICE", "SS_SOLD_DATE_SK"
from TPCDS.STORE_SALES
where "SS_CUSTOMER_SK" IS NOT NULL and "SS_SOLD_DATE_SK" IS NOT NULL

(30) Filter [codegen id : 14]
Input [4]: [SS_CUSTOMER_SK#9862, SS_EXT_DISCOUNT_AMT#9873, SS_EXT_LIST_PRICE#9876, SS_SOLD_DATE_SK#9859]
Condition : isnotnull(SS_CUSTOMER_SK#9862)

(31) Exchange
Input [4]: [SS_CUSTOMER_SK#9862, SS_EXT_DISCOUNT_AMT#9873, SS_EXT_LIST_PRICE#9876, SS_SOLD_DATE_SK#9859]
Arguments: hashpartitioning(ss_customer_sk#9862, 5), ENSURE_REQUIREMENTS, [id=#4514]

(32) Sort [codegen id : 15]
Input [4]: [SS_CUSTOMER_SK#9862, SS_EXT_DISCOUNT_AMT#9873, SS_EXT_LIST_PRICE#9876, SS_SOLD_DATE_SK#9859]
Arguments: [ss_customer_sk#9862 ASC NULLS FIRST], false, 0

(33) SortMergeJoin [codegen id : 16]
Left keys [1]: [c_customer_sk#9841]
Right keys [1]: [ss_customer_sk#9862]
Join condition: None

(34) Project [codegen id : 16]
Output [10]: [C_CUSTOMER_ID#9842, C_FIRST_NAME#9849, C_LAST_NAME#9850, C_PREFERRED_CUST_FLAG#9851, C_BIRTH_COUNTRY#9855, C_LOGIN#9856, C_EMAIL_ADDRESS#9857, SS_SOLD_DATE_SK#9859, SS_EXT_DISCOUNT_AMT#9873, SS_EXT_LIST_PRICE#9876]
Input [12]: [C_CUSTOMER_SK#9841, C_CUSTOMER_ID#9842, C_FIRST_NAME#9849, C_LAST_NAME#9850, C_PREFERRED_CUST_FLAG#9851, C_BIRTH_COUNTRY#9855, C_LOGIN#9856, C_EMAIL_ADDRESS#9857, SS_CUSTOMER_SK#9862, SS_EXT_DISCOUNT_AMT#9873, SS_EXT_LIST_PRICE#9876, SS_SOLD_DATE_SK#9859]

(35) Exchange
Input [10]: [C_CUSTOMER_ID#9842, C_FIRST_NAME#9849, C_LAST_NAME#9850, C_PREFERRED_CUST_FLAG#9851, C_BIRTH_COUNTRY#9855, C_LOGIN#9856, C_EMAIL_ADDRESS#9857, SS_SOLD_DATE_SK#9859, SS_EXT_DISCOUNT_AMT#9873, SS_EXT_LIST_PRICE#9876]
Arguments: hashpartitioning(ss_sold_date_sk#9859, 5), ENSURE_REQUIREMENTS, [id=#4522]

(36) Sort [codegen id : 17]
Input [10]: [C_CUSTOMER_ID#9842, C_FIRST_NAME#9849, C_LAST_NAME#9850, C_PREFERRED_CUST_FLAG#9851, C_BIRTH_COUNTRY#9855, C_LOGIN#9856, C_EMAIL_ADDRESS#9857, SS_SOLD_DATE_SK#9859, SS_EXT_DISCOUNT_AMT#9873, SS_EXT_LIST_PRICE#9876]
Arguments: [ss_sold_date_sk#9859 ASC NULLS FIRST], false, 0

(37) BatchScan
Output [2]: [D_DATE_SK#9882, D_YEAR#9888]
Format: orafile
OraPlan: 00 OraTableScan TPCDS.DATE_DIM, [D_DATE_SK#10394, D_YEAR#10395], [oracolumnref(D_DATE_SK#10394), oracolumnref(D_YEAR#10395)], orabinaryopexpression((isnotnull(D_YEAR#9888) AND (D_YEAR#9888 = 2002.000000000000000000)))
PartitionSchema: struct<>
ReadSchema: struct<D_DATE_SK:decimal(38,18),D_YEAR:decimal(38,18)>
dsKey: DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
oraPushdownBindValues: 2002.000000000000000000
oraPushdownSQL: select "D_DATE_SK", "D_YEAR"
from TPCDS.DATE_DIM
where ("D_YEAR" IS NOT NULL AND ("D_YEAR" = ?))

(38) Filter [codegen id : 18]
Input [2]: [D_DATE_SK#9882, D_YEAR#9888]
Condition : (isnotnull(D_YEAR#9888) AND (D_YEAR#9888 = 2002.000000000000000000))

(39) Exchange
Input [2]: [D_DATE_SK#9882, D_YEAR#9888]
Arguments: hashpartitioning(d_date_sk#9882, 5), ENSURE_REQUIREMENTS, [id=#4530]

(40) Sort [codegen id : 19]
Input [2]: [D_DATE_SK#9882, D_YEAR#9888]
Arguments: [d_date_sk#9882 ASC NULLS FIRST], false, 0

(41) SortMergeJoin [codegen id : 20]
Left keys [1]: [ss_sold_date_sk#9859]
Right keys [1]: [d_date_sk#9882]
Join condition: None

(42) Project [codegen id : 20]
Output [10]: [C_CUSTOMER_ID#9842, C_FIRST_NAME#9849, C_LAST_NAME#9850, C_PREFERRED_CUST_FLAG#9851, C_BIRTH_COUNTRY#9855, C_LOGIN#9856, C_EMAIL_ADDRESS#9857, SS_EXT_DISCOUNT_AMT#9873, SS_EXT_LIST_PRICE#9876, D_YEAR#9888]
Input [12]: [C_CUSTOMER_ID#9842, C_FIRST_NAME#9849, C_LAST_NAME#9850, C_PREFERRED_CUST_FLAG#9851, C_BIRTH_COUNTRY#9855, C_LOGIN#9856, C_EMAIL_ADDRESS#9857, SS_SOLD_DATE_SK#9859, SS_EXT_DISCOUNT_AMT#9873, SS_EXT_LIST_PRICE#9876, D_DATE_SK#9882, D_YEAR#9888]

(43) HashAggregate [codegen id : 20]
Input [10]: [C_CUSTOMER_ID#9842, C_FIRST_NAME#9849, C_LAST_NAME#9850, C_PREFERRED_CUST_FLAG#9851, C_BIRTH_COUNTRY#9855, C_LOGIN#9856, C_EMAIL_ADDRESS#9857, SS_EXT_DISCOUNT_AMT#9873, SS_EXT_LIST_PRICE#9876, D_YEAR#9888]
Keys [8]: [c_customer_id#9842, c_first_name#9849, c_last_name#9850, c_preferred_cust_flag#9851, c_birth_country#9855, c_login#9856, c_email_address#9857, d_year#9888]
Functions [1]: [partial_sum(CheckOverflow((promote_precision(cast(ss_ext_list_price#9876 as decimal(38,17))) - promote_precision(cast(ss_ext_discount_amt#9873 as decimal(38,17)))), DecimalType(38,17), true))]
Aggregate Attributes [2]: [sum#10494, isEmpty#10495]
Results [10]: [c_customer_id#9842, c_first_name#9849, c_last_name#9850, c_preferred_cust_flag#9851, c_birth_country#9855, c_login#9856, c_email_address#9857, d_year#9888, sum#10496, isEmpty#10497]

(44) Exchange
Input [10]: [c_customer_id#9842, c_first_name#9849, c_last_name#9850, c_preferred_cust_flag#9851, c_birth_country#9855, c_login#9856, c_email_address#9857, d_year#9888, sum#10496, isEmpty#10497]
Arguments: hashpartitioning(c_customer_id#9842, c_first_name#9849, c_last_name#9850, c_preferred_cust_flag#9851, c_birth_country#9855, c_login#9856, c_email_address#9857, d_year#9888, 5), ENSURE_REQUIREMENTS, [id=#4539]

(45) HashAggregate [codegen id : 21]
Input [10]: [c_customer_id#9842, c_first_name#9849, c_last_name#9850, c_preferred_cust_flag#9851, c_birth_country#9855, c_login#9856, c_email_address#9857, d_year#9888, sum#10496, isEmpty#10497]
Keys [8]: [c_customer_id#9842, c_first_name#9849, c_last_name#9850, c_preferred_cust_flag#9851, c_birth_country#9855, c_login#9856, c_email_address#9857, d_year#9888]
Functions [1]: [sum(CheckOverflow((promote_precision(cast(ss_ext_list_price#9876 as decimal(38,17))) - promote_precision(cast(ss_ext_discount_amt#9873 as decimal(38,17)))), DecimalType(38,17), true))]
Aggregate Attributes [1]: [sum(CheckOverflow((promote_precision(cast(ss_ext_list_price#9876 as decimal(38,17))) - promote_precision(cast(ss_ext_discount_amt#9873 as decimal(38,17)))), DecimalType(38,17), true))#10290]
Results [5]: [c_customer_id#9842 AS customer_id#10296, c_first_name#9849 AS customer_first_name#10297, c_last_name#9850 AS customer_last_name#10298, c_preferred_cust_flag#9851 AS customer_preferred_cust_flag#10299, sum(CheckOverflow((promote_precision(cast(ss_ext_list_price#9876 as decimal(38,17))) - promote_precision(cast(ss_ext_discount_amt#9873 as decimal(38,17)))), DecimalType(38,17), true))#10290 AS year_total#10304]

(46) Exchange
Input [5]: [customer_id#10296, customer_first_name#10297, customer_last_name#10298, customer_preferred_cust_flag#10299, year_total#10304]
Arguments: hashpartitioning(customer_id#10296, 5), ENSURE_REQUIREMENTS, [id=#4543]

(47) Sort [codegen id : 22]
Input [5]: [customer_id#10296, customer_first_name#10297, customer_last_name#10298, customer_preferred_cust_flag#10299, year_total#10304]
Arguments: [customer_id#10296 ASC NULLS FIRST], false, 0

(48) SortMergeJoin [codegen id : 23]
Left keys [1]: [customer_id#9672]
Right keys [1]: [customer_id#10296]
Join condition: None

(49) BatchScan
Output [8]: [C_CUSTOMER_SK#10059, C_CUSTOMER_ID#10060, C_FIRST_NAME#10067, C_LAST_NAME#10068, C_PREFERRED_CUST_FLAG#10069, C_BIRTH_COUNTRY#10073, C_LOGIN#10074, C_EMAIL_ADDRESS#10075]
Format: orafile
OraPlan: 00 OraTableScan TPCDS.CUSTOMER, [C_CUSTOMER_SK#10422, C_CUSTOMER_ID#10423, C_FIRST_NAME#10424, C_LAST_NAME#10425, C_PREFERRED_CUST_FLAG#10426, C_BIRTH_COUNTRY#10427, C_LOGIN#10428, C_EMAIL_ADDRESS#10429], [oracolumnref(C_CUSTOMER_SK#10422), oracolumnref(C_CUSTOMER_ID#10423), oracolumnref(C_FIRST_NAME#10424), oracolumnref(C_LAST_NAME#10425), oracolumnref(C_PREFERRED_CUST_FLAG#10426), oracolumnref(C_BIRTH_COUNTRY#10427), oracolumnref(C_LOGIN#10428), oracolumnref(C_EMAIL_ADDRESS#10429)]
PartitionSchema: struct<>
ReadSchema: struct<C_CUSTOMER_SK:decimal(38,18),C_CUSTOMER_ID:string,C_FIRST_NAME:string,C_LAST_NAME:string,C_PREFERRED_CUST_FLAG:string,C_BIRTH_COUNTRY:string,C_LOGIN:string,C_EMAIL_ADDRESS:string>
dsKey: DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
oraPushdownSQL: select "C_CUSTOMER_SK", "C_CUSTOMER_ID", "C_FIRST_NAME", "C_LAST_NAME", "C_PREFERRED_CUST_FLAG", "C_BIRTH_COUNTRY", "C_LOGIN", "C_EMAIL_ADDRESS"
from TPCDS.CUSTOMER

(50) Project [codegen id : 24]
Output [8]: [C_CUSTOMER_SK#10059, C_CUSTOMER_ID#10060, C_FIRST_NAME#10067, C_LAST_NAME#10068, C_PREFERRED_CUST_FLAG#10069, C_BIRTH_COUNTRY#10073, C_LOGIN#10074, C_EMAIL_ADDRESS#10075]
Input [8]: [C_CUSTOMER_SK#10059, C_CUSTOMER_ID#10060, C_FIRST_NAME#10067, C_LAST_NAME#10068, C_PREFERRED_CUST_FLAG#10069, C_BIRTH_COUNTRY#10073, C_LOGIN#10074, C_EMAIL_ADDRESS#10075]

(51) Exchange
Input [8]: [C_CUSTOMER_SK#10059, C_CUSTOMER_ID#10060, C_FIRST_NAME#10067, C_LAST_NAME#10068, C_PREFERRED_CUST_FLAG#10069, C_BIRTH_COUNTRY#10073, C_LOGIN#10074, C_EMAIL_ADDRESS#10075]
Arguments: hashpartitioning(c_customer_sk#10059, 5), ENSURE_REQUIREMENTS, [id=#4554]

(52) Sort [codegen id : 25]
Input [8]: [C_CUSTOMER_SK#10059, C_CUSTOMER_ID#10060, C_FIRST_NAME#10067, C_LAST_NAME#10068, C_PREFERRED_CUST_FLAG#10069, C_BIRTH_COUNTRY#10073, C_LOGIN#10074, C_EMAIL_ADDRESS#10075]
Arguments: [c_customer_sk#10059 ASC NULLS FIRST], false, 0

(53) BatchScan
Output [4]: [WS_BILL_CUSTOMER_SK#10081, WS_EXT_DISCOUNT_AMT#10099, WS_EXT_LIST_PRICE#10102, WS_SOLD_DATE_SK#10077]
Format: orafile
OraPlan: 00 OraTableScan TPCDS.WEB_SALES, [WS_BILL_CUSTOMER_SK#10438, WS_EXT_DISCOUNT_AMT#10439, WS_EXT_LIST_PRICE#10440, WS_SOLD_DATE_SK#10441], [oracolumnref(WS_BILL_CUSTOMER_SK#10438), oracolumnref(WS_EXT_DISCOUNT_AMT#10439), oracolumnref(WS_EXT_LIST_PRICE#10440), oracolumnref(WS_SOLD_DATE_SK#10441)], orapostfixunaryopexpression(isnotnull(WS_BILL_CUSTOMER_SK#10081))
PartitionSchema: struct<WS_SOLD_DATE_SK:decimal(38,18)>
ReadSchema: struct<WS_BILL_CUSTOMER_SK:decimal(38,18),WS_EXT_DISCOUNT_AMT:decimal(38,18),WS_EXT_LIST_PRICE:decimal(38,18)>
dsKey: DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
oraPushdownSQL: select "WS_BILL_CUSTOMER_SK", "WS_EXT_DISCOUNT_AMT", "WS_EXT_LIST_PRICE", "WS_SOLD_DATE_SK"
from TPCDS.WEB_SALES
where "WS_BILL_CUSTOMER_SK" IS NOT NULL and "WS_SOLD_DATE_SK" IS NOT NULL

(54) Filter [codegen id : 26]
Input [4]: [WS_BILL_CUSTOMER_SK#10081, WS_EXT_DISCOUNT_AMT#10099, WS_EXT_LIST_PRICE#10102, WS_SOLD_DATE_SK#10077]
Condition : isnotnull(WS_BILL_CUSTOMER_SK#10081)

(55) Exchange
Input [4]: [WS_BILL_CUSTOMER_SK#10081, WS_EXT_DISCOUNT_AMT#10099, WS_EXT_LIST_PRICE#10102, WS_SOLD_DATE_SK#10077]
Arguments: hashpartitioning(ws_bill_customer_sk#10081, 5), ENSURE_REQUIREMENTS, [id=#4562]

(56) Sort [codegen id : 27]
Input [4]: [WS_BILL_CUSTOMER_SK#10081, WS_EXT_DISCOUNT_AMT#10099, WS_EXT_LIST_PRICE#10102, WS_SOLD_DATE_SK#10077]
Arguments: [ws_bill_customer_sk#10081 ASC NULLS FIRST], false, 0

(57) SortMergeJoin [codegen id : 28]
Left keys [1]: [c_customer_sk#10059]
Right keys [1]: [ws_bill_customer_sk#10081]
Join condition: None

(58) Project [codegen id : 28]
Output [10]: [C_CUSTOMER_ID#10060, C_FIRST_NAME#10067, C_LAST_NAME#10068, C_PREFERRED_CUST_FLAG#10069, C_BIRTH_COUNTRY#10073, C_LOGIN#10074, C_EMAIL_ADDRESS#10075, WS_SOLD_DATE_SK#10077, WS_EXT_DISCOUNT_AMT#10099, WS_EXT_LIST_PRICE#10102]
Input [12]: [C_CUSTOMER_SK#10059, C_CUSTOMER_ID#10060, C_FIRST_NAME#10067, C_LAST_NAME#10068, C_PREFERRED_CUST_FLAG#10069, C_BIRTH_COUNTRY#10073, C_LOGIN#10074, C_EMAIL_ADDRESS#10075, WS_BILL_CUSTOMER_SK#10081, WS_EXT_DISCOUNT_AMT#10099, WS_EXT_LIST_PRICE#10102, WS_SOLD_DATE_SK#10077]

(59) Exchange
Input [10]: [C_CUSTOMER_ID#10060, C_FIRST_NAME#10067, C_LAST_NAME#10068, C_PREFERRED_CUST_FLAG#10069, C_BIRTH_COUNTRY#10073, C_LOGIN#10074, C_EMAIL_ADDRESS#10075, WS_SOLD_DATE_SK#10077, WS_EXT_DISCOUNT_AMT#10099, WS_EXT_LIST_PRICE#10102]
Arguments: hashpartitioning(ws_sold_date_sk#10077, 5), ENSURE_REQUIREMENTS, [id=#4570]

(60) Sort [codegen id : 29]
Input [10]: [C_CUSTOMER_ID#10060, C_FIRST_NAME#10067, C_LAST_NAME#10068, C_PREFERRED_CUST_FLAG#10069, C_BIRTH_COUNTRY#10073, C_LOGIN#10074, C_EMAIL_ADDRESS#10075, WS_SOLD_DATE_SK#10077, WS_EXT_DISCOUNT_AMT#10099, WS_EXT_LIST_PRICE#10102]
Arguments: [ws_sold_date_sk#10077 ASC NULLS FIRST], false, 0

(61) BatchScan
Output [2]: [D_DATE_SK#10111, D_YEAR#10117]
Format: orafile
OraPlan: 00 OraTableScan TPCDS.DATE_DIM, [D_DATE_SK#10446, D_YEAR#10447], [oracolumnref(D_DATE_SK#10446), oracolumnref(D_YEAR#10447)], orabinaryopexpression((isnotnull(D_YEAR#10117) AND (D_YEAR#10117 = 2001.000000000000000000)))
PartitionSchema: struct<>
ReadSchema: struct<D_DATE_SK:decimal(38,18),D_YEAR:decimal(38,18)>
dsKey: DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
oraPushdownBindValues: 2001.000000000000000000
oraPushdownSQL: select "D_DATE_SK", "D_YEAR"
from TPCDS.DATE_DIM
where ("D_YEAR" IS NOT NULL AND ("D_YEAR" = ?))

(62) Filter [codegen id : 30]
Input [2]: [D_DATE_SK#10111, D_YEAR#10117]
Condition : (isnotnull(D_YEAR#10117) AND (D_YEAR#10117 = 2001.000000000000000000))

(63) Exchange
Input [2]: [D_DATE_SK#10111, D_YEAR#10117]
Arguments: hashpartitioning(d_date_sk#10111, 5), ENSURE_REQUIREMENTS, [id=#4578]

(64) Sort [codegen id : 31]
Input [2]: [D_DATE_SK#10111, D_YEAR#10117]
Arguments: [d_date_sk#10111 ASC NULLS FIRST], false, 0

(65) SortMergeJoin [codegen id : 32]
Left keys [1]: [ws_sold_date_sk#10077]
Right keys [1]: [d_date_sk#10111]
Join condition: None

(66) Project [codegen id : 32]
Output [10]: [C_CUSTOMER_ID#10060, C_FIRST_NAME#10067, C_LAST_NAME#10068, C_PREFERRED_CUST_FLAG#10069, C_BIRTH_COUNTRY#10073, C_LOGIN#10074, C_EMAIL_ADDRESS#10075, WS_EXT_DISCOUNT_AMT#10099, WS_EXT_LIST_PRICE#10102, D_YEAR#10117]
Input [12]: [C_CUSTOMER_ID#10060, C_FIRST_NAME#10067, C_LAST_NAME#10068, C_PREFERRED_CUST_FLAG#10069, C_BIRTH_COUNTRY#10073, C_LOGIN#10074, C_EMAIL_ADDRESS#10075, WS_SOLD_DATE_SK#10077, WS_EXT_DISCOUNT_AMT#10099, WS_EXT_LIST_PRICE#10102, D_DATE_SK#10111, D_YEAR#10117]

(67) HashAggregate [codegen id : 32]
Input [10]: [C_CUSTOMER_ID#10060, C_FIRST_NAME#10067, C_LAST_NAME#10068, C_PREFERRED_CUST_FLAG#10069, C_BIRTH_COUNTRY#10073, C_LOGIN#10074, C_EMAIL_ADDRESS#10075, WS_EXT_DISCOUNT_AMT#10099, WS_EXT_LIST_PRICE#10102, D_YEAR#10117]
Keys [8]: [c_customer_id#10060, c_first_name#10067, c_last_name#10068, c_preferred_cust_flag#10069, c_birth_country#10073, c_login#10074, c_email_address#10075, d_year#10117]
Functions [1]: [partial_sum(CheckOverflow((promote_precision(cast(ws_ext_list_price#10102 as decimal(38,17))) - promote_precision(cast(ws_ext_discount_amt#10099 as decimal(38,17)))), DecimalType(38,17), true))]
Aggregate Attributes [2]: [sum#10498, isEmpty#10499]
Results [10]: [c_customer_id#10060, c_first_name#10067, c_last_name#10068, c_preferred_cust_flag#10069, c_birth_country#10073, c_login#10074, c_email_address#10075, d_year#10117, sum#10500, isEmpty#10501]

(68) Exchange
Input [10]: [c_customer_id#10060, c_first_name#10067, c_last_name#10068, c_preferred_cust_flag#10069, c_birth_country#10073, c_login#10074, c_email_address#10075, d_year#10117, sum#10500, isEmpty#10501]
Arguments: hashpartitioning(c_customer_id#10060, c_first_name#10067, c_last_name#10068, c_preferred_cust_flag#10069, c_birth_country#10073, c_login#10074, c_email_address#10075, d_year#10117, 5), ENSURE_REQUIREMENTS, [id=#4587]

(69) HashAggregate [codegen id : 33]
Input [10]: [c_customer_id#10060, c_first_name#10067, c_last_name#10068, c_preferred_cust_flag#10069, c_birth_country#10073, c_login#10074, c_email_address#10075, d_year#10117, sum#10500, isEmpty#10501]
Keys [8]: [c_customer_id#10060, c_first_name#10067, c_last_name#10068, c_preferred_cust_flag#10069, c_birth_country#10073, c_login#10074, c_email_address#10075, d_year#10117]
Functions [1]: [sum(CheckOverflow((promote_precision(cast(ws_ext_list_price#10102 as decimal(38,17))) - promote_precision(cast(ws_ext_discount_amt#10099 as decimal(38,17)))), DecimalType(38,17), true))]
Aggregate Attributes [1]: [sum(CheckOverflow((promote_precision(cast(ws_ext_list_price#10102 as decimal(38,17))) - promote_precision(cast(ws_ext_discount_amt#10099 as decimal(38,17)))), DecimalType(38,17), true))#10293]
Results [2]: [c_customer_id#10060 AS customer_id#9682, sum(CheckOverflow((promote_precision(cast(ws_ext_list_price#10102 as decimal(38,17))) - promote_precision(cast(ws_ext_discount_amt#10099 as decimal(38,17)))), DecimalType(38,17), true))#10293 AS year_total#9690]

(70) Filter [codegen id : 33]
Input [2]: [customer_id#9682, year_total#9690]
Condition : (isnotnull(year_total#9690) AND (year_total#9690 > 0E-17))

(71) Project [codegen id : 33]
Output [2]: [customer_id#9682 AS customer_id#10306, year_total#9690 AS year_total#10314]
Input [2]: [customer_id#9682, year_total#9690]

(72) Exchange
Input [2]: [customer_id#10306, year_total#10314]
Arguments: hashpartitioning(customer_id#10306, 5), ENSURE_REQUIREMENTS, [id=#4593]

(73) Sort [codegen id : 34]
Input [2]: [customer_id#10306, year_total#10314]
Arguments: [customer_id#10306 ASC NULLS FIRST], false, 0

(74) SortMergeJoin [codegen id : 35]
Left keys [1]: [customer_id#9672]
Right keys [1]: [customer_id#10306]
Join condition: None

(75) Project [codegen id : 35]
Output [8]: [customer_id#9672, year_total#9680, customer_id#10296, customer_first_name#10297, customer_last_name#10298, customer_preferred_cust_flag#10299, year_total#10304, year_total#10314]
Input [9]: [customer_id#9672, year_total#9680, customer_id#10296, customer_first_name#10297, customer_last_name#10298, customer_preferred_cust_flag#10299, year_total#10304, customer_id#10306, year_total#10314]

(76) BatchScan
Output [8]: [C_CUSTOMER_SK#10208, C_CUSTOMER_ID#10209, C_FIRST_NAME#10216, C_LAST_NAME#10217, C_PREFERRED_CUST_FLAG#10218, C_BIRTH_COUNTRY#10222, C_LOGIN#10223, C_EMAIL_ADDRESS#10224]
Format: orafile
OraPlan: 00 OraTableScan TPCDS.CUSTOMER, [C_CUSTOMER_SK#10462, C_CUSTOMER_ID#10463, C_FIRST_NAME#10464, C_LAST_NAME#10465, C_PREFERRED_CUST_FLAG#10466, C_BIRTH_COUNTRY#10467, C_LOGIN#10468, C_EMAIL_ADDRESS#10469], [oracolumnref(C_CUSTOMER_SK#10462), oracolumnref(C_CUSTOMER_ID#10463), oracolumnref(C_FIRST_NAME#10464), oracolumnref(C_LAST_NAME#10465), oracolumnref(C_PREFERRED_CUST_FLAG#10466), oracolumnref(C_BIRTH_COUNTRY#10467), oracolumnref(C_LOGIN#10468), oracolumnref(C_EMAIL_ADDRESS#10469)]
PartitionSchema: struct<>
ReadSchema: struct<C_CUSTOMER_SK:decimal(38,18),C_CUSTOMER_ID:string,C_FIRST_NAME:string,C_LAST_NAME:string,C_PREFERRED_CUST_FLAG:string,C_BIRTH_COUNTRY:string,C_LOGIN:string,C_EMAIL_ADDRESS:string>
dsKey: DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
oraPushdownSQL: select "C_CUSTOMER_SK", "C_CUSTOMER_ID", "C_FIRST_NAME", "C_LAST_NAME", "C_PREFERRED_CUST_FLAG", "C_BIRTH_COUNTRY", "C_LOGIN", "C_EMAIL_ADDRESS"
from TPCDS.CUSTOMER

(77) Project [codegen id : 36]
Output [8]: [C_CUSTOMER_SK#10208, C_CUSTOMER_ID#10209, C_FIRST_NAME#10216, C_LAST_NAME#10217, C_PREFERRED_CUST_FLAG#10218, C_BIRTH_COUNTRY#10222, C_LOGIN#10223, C_EMAIL_ADDRESS#10224]
Input [8]: [C_CUSTOMER_SK#10208, C_CUSTOMER_ID#10209, C_FIRST_NAME#10216, C_LAST_NAME#10217, C_PREFERRED_CUST_FLAG#10218, C_BIRTH_COUNTRY#10222, C_LOGIN#10223, C_EMAIL_ADDRESS#10224]

(78) Exchange
Input [8]: [C_CUSTOMER_SK#10208, C_CUSTOMER_ID#10209, C_FIRST_NAME#10216, C_LAST_NAME#10217, C_PREFERRED_CUST_FLAG#10218, C_BIRTH_COUNTRY#10222, C_LOGIN#10223, C_EMAIL_ADDRESS#10224]
Arguments: hashpartitioning(c_customer_sk#10208, 5), ENSURE_REQUIREMENTS, [id=#4605]

(79) Sort [codegen id : 37]
Input [8]: [C_CUSTOMER_SK#10208, C_CUSTOMER_ID#10209, C_FIRST_NAME#10216, C_LAST_NAME#10217, C_PREFERRED_CUST_FLAG#10218, C_BIRTH_COUNTRY#10222, C_LOGIN#10223, C_EMAIL_ADDRESS#10224]
Arguments: [c_customer_sk#10208 ASC NULLS FIRST], false, 0

(80) BatchScan
Output [4]: [WS_BILL_CUSTOMER_SK#10230, WS_EXT_DISCOUNT_AMT#10248, WS_EXT_LIST_PRICE#10251, WS_SOLD_DATE_SK#10226]
Format: orafile
OraPlan: 00 OraTableScan TPCDS.WEB_SALES, [WS_BILL_CUSTOMER_SK#10478, WS_EXT_DISCOUNT_AMT#10479, WS_EXT_LIST_PRICE#10480, WS_SOLD_DATE_SK#10481], [oracolumnref(WS_BILL_CUSTOMER_SK#10478), oracolumnref(WS_EXT_DISCOUNT_AMT#10479), oracolumnref(WS_EXT_LIST_PRICE#10480), oracolumnref(WS_SOLD_DATE_SK#10481)], orapostfixunaryopexpression(isnotnull(WS_BILL_CUSTOMER_SK#10230))
PartitionSchema: struct<WS_SOLD_DATE_SK:decimal(38,18)>
ReadSchema: struct<WS_BILL_CUSTOMER_SK:decimal(38,18),WS_EXT_DISCOUNT_AMT:decimal(38,18),WS_EXT_LIST_PRICE:decimal(38,18)>
dsKey: DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
oraPushdownSQL: select "WS_BILL_CUSTOMER_SK", "WS_EXT_DISCOUNT_AMT", "WS_EXT_LIST_PRICE", "WS_SOLD_DATE_SK"
from TPCDS.WEB_SALES
where "WS_BILL_CUSTOMER_SK" IS NOT NULL and "WS_SOLD_DATE_SK" IS NOT NULL

(81) Filter [codegen id : 38]
Input [4]: [WS_BILL_CUSTOMER_SK#10230, WS_EXT_DISCOUNT_AMT#10248, WS_EXT_LIST_PRICE#10251, WS_SOLD_DATE_SK#10226]
Condition : isnotnull(WS_BILL_CUSTOMER_SK#10230)

(82) Exchange
Input [4]: [WS_BILL_CUSTOMER_SK#10230, WS_EXT_DISCOUNT_AMT#10248, WS_EXT_LIST_PRICE#10251, WS_SOLD_DATE_SK#10226]
Arguments: hashpartitioning(ws_bill_customer_sk#10230, 5), ENSURE_REQUIREMENTS, [id=#4613]

(83) Sort [codegen id : 39]
Input [4]: [WS_BILL_CUSTOMER_SK#10230, WS_EXT_DISCOUNT_AMT#10248, WS_EXT_LIST_PRICE#10251, WS_SOLD_DATE_SK#10226]
Arguments: [ws_bill_customer_sk#10230 ASC NULLS FIRST], false, 0

(84) SortMergeJoin [codegen id : 40]
Left keys [1]: [c_customer_sk#10208]
Right keys [1]: [ws_bill_customer_sk#10230]
Join condition: None

(85) Project [codegen id : 40]
Output [10]: [C_CUSTOMER_ID#10209, C_FIRST_NAME#10216, C_LAST_NAME#10217, C_PREFERRED_CUST_FLAG#10218, C_BIRTH_COUNTRY#10222, C_LOGIN#10223, C_EMAIL_ADDRESS#10224, WS_SOLD_DATE_SK#10226, WS_EXT_DISCOUNT_AMT#10248, WS_EXT_LIST_PRICE#10251]
Input [12]: [C_CUSTOMER_SK#10208, C_CUSTOMER_ID#10209, C_FIRST_NAME#10216, C_LAST_NAME#10217, C_PREFERRED_CUST_FLAG#10218, C_BIRTH_COUNTRY#10222, C_LOGIN#10223, C_EMAIL_ADDRESS#10224, WS_BILL_CUSTOMER_SK#10230, WS_EXT_DISCOUNT_AMT#10248, WS_EXT_LIST_PRICE#10251, WS_SOLD_DATE_SK#10226]

(86) Exchange
Input [10]: [C_CUSTOMER_ID#10209, C_FIRST_NAME#10216, C_LAST_NAME#10217, C_PREFERRED_CUST_FLAG#10218, C_BIRTH_COUNTRY#10222, C_LOGIN#10223, C_EMAIL_ADDRESS#10224, WS_SOLD_DATE_SK#10226, WS_EXT_DISCOUNT_AMT#10248, WS_EXT_LIST_PRICE#10251]
Arguments: hashpartitioning(ws_sold_date_sk#10226, 5), ENSURE_REQUIREMENTS, [id=#4621]

(87) Sort [codegen id : 41]
Input [10]: [C_CUSTOMER_ID#10209, C_FIRST_NAME#10216, C_LAST_NAME#10217, C_PREFERRED_CUST_FLAG#10218, C_BIRTH_COUNTRY#10222, C_LOGIN#10223, C_EMAIL_ADDRESS#10224, WS_SOLD_DATE_SK#10226, WS_EXT_DISCOUNT_AMT#10248, WS_EXT_LIST_PRICE#10251]
Arguments: [ws_sold_date_sk#10226 ASC NULLS FIRST], false, 0

(88) BatchScan
Output [2]: [D_DATE_SK#10260, D_YEAR#10266]
Format: orafile
OraPlan: 00 OraTableScan TPCDS.DATE_DIM, [D_DATE_SK#10486, D_YEAR#10487], [oracolumnref(D_DATE_SK#10486), oracolumnref(D_YEAR#10487)], orabinaryopexpression((isnotnull(D_YEAR#10266) AND (D_YEAR#10266 = 2002.000000000000000000)))
PartitionSchema: struct<>
ReadSchema: struct<D_DATE_SK:decimal(38,18),D_YEAR:decimal(38,18)>
dsKey: DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
oraPushdownBindValues: 2002.000000000000000000
oraPushdownSQL: select "D_DATE_SK", "D_YEAR"
from TPCDS.DATE_DIM
where ("D_YEAR" IS NOT NULL AND ("D_YEAR" = ?))

(89) Filter [codegen id : 42]
Input [2]: [D_DATE_SK#10260, D_YEAR#10266]
Condition : (isnotnull(D_YEAR#10266) AND (D_YEAR#10266 = 2002.000000000000000000))

(90) Exchange
Input [2]: [D_DATE_SK#10260, D_YEAR#10266]
Arguments: hashpartitioning(d_date_sk#10260, 5), ENSURE_REQUIREMENTS, [id=#4629]

(91) Sort [codegen id : 43]
Input [2]: [D_DATE_SK#10260, D_YEAR#10266]
Arguments: [d_date_sk#10260 ASC NULLS FIRST], false, 0

(92) SortMergeJoin [codegen id : 44]
Left keys [1]: [ws_sold_date_sk#10226]
Right keys [1]: [d_date_sk#10260]
Join condition: None

(93) Project [codegen id : 44]
Output [10]: [C_CUSTOMER_ID#10209, C_FIRST_NAME#10216, C_LAST_NAME#10217, C_PREFERRED_CUST_FLAG#10218, C_BIRTH_COUNTRY#10222, C_LOGIN#10223, C_EMAIL_ADDRESS#10224, WS_EXT_DISCOUNT_AMT#10248, WS_EXT_LIST_PRICE#10251, D_YEAR#10266]
Input [12]: [C_CUSTOMER_ID#10209, C_FIRST_NAME#10216, C_LAST_NAME#10217, C_PREFERRED_CUST_FLAG#10218, C_BIRTH_COUNTRY#10222, C_LOGIN#10223, C_EMAIL_ADDRESS#10224, WS_SOLD_DATE_SK#10226, WS_EXT_DISCOUNT_AMT#10248, WS_EXT_LIST_PRICE#10251, D_DATE_SK#10260, D_YEAR#10266]

(94) HashAggregate [codegen id : 44]
Input [10]: [C_CUSTOMER_ID#10209, C_FIRST_NAME#10216, C_LAST_NAME#10217, C_PREFERRED_CUST_FLAG#10218, C_BIRTH_COUNTRY#10222, C_LOGIN#10223, C_EMAIL_ADDRESS#10224, WS_EXT_DISCOUNT_AMT#10248, WS_EXT_LIST_PRICE#10251, D_YEAR#10266]
Keys [8]: [c_customer_id#10209, c_first_name#10216, c_last_name#10217, c_preferred_cust_flag#10218, c_birth_country#10222, c_login#10223, c_email_address#10224, d_year#10266]
Functions [1]: [partial_sum(CheckOverflow((promote_precision(cast(ws_ext_list_price#10251 as decimal(38,17))) - promote_precision(cast(ws_ext_discount_amt#10248 as decimal(38,17)))), DecimalType(38,17), true))]
Aggregate Attributes [2]: [sum#10502, isEmpty#10503]
Results [10]: [c_customer_id#10209, c_first_name#10216, c_last_name#10217, c_preferred_cust_flag#10218, c_birth_country#10222, c_login#10223, c_email_address#10224, d_year#10266, sum#10504, isEmpty#10505]

(95) Exchange
Input [10]: [c_customer_id#10209, c_first_name#10216, c_last_name#10217, c_preferred_cust_flag#10218, c_birth_country#10222, c_login#10223, c_email_address#10224, d_year#10266, sum#10504, isEmpty#10505]
Arguments: hashpartitioning(c_customer_id#10209, c_first_name#10216, c_last_name#10217, c_preferred_cust_flag#10218, c_birth_country#10222, c_login#10223, c_email_address#10224, d_year#10266, 5), ENSURE_REQUIREMENTS, [id=#4638]

(96) HashAggregate [codegen id : 45]
Input [10]: [c_customer_id#10209, c_first_name#10216, c_last_name#10217, c_preferred_cust_flag#10218, c_birth_country#10222, c_login#10223, c_email_address#10224, d_year#10266, sum#10504, isEmpty#10505]
Keys [8]: [c_customer_id#10209, c_first_name#10216, c_last_name#10217, c_preferred_cust_flag#10218, c_birth_country#10222, c_login#10223, c_email_address#10224, d_year#10266]
Functions [1]: [sum(CheckOverflow((promote_precision(cast(ws_ext_list_price#10251 as decimal(38,17))) - promote_precision(cast(ws_ext_discount_amt#10248 as decimal(38,17)))), DecimalType(38,17), true))]
Aggregate Attributes [1]: [sum(CheckOverflow((promote_precision(cast(ws_ext_list_price#10251 as decimal(38,17))) - promote_precision(cast(ws_ext_discount_amt#10248 as decimal(38,17)))), DecimalType(38,17), true))#10295]
Results [2]: [c_customer_id#10209 AS customer_id#10316, sum(CheckOverflow((promote_precision(cast(ws_ext_list_price#10251 as decimal(38,17))) - promote_precision(cast(ws_ext_discount_amt#10248 as decimal(38,17)))), DecimalType(38,17), true))#10295 AS year_total#10324]

(97) Exchange
Input [2]: [customer_id#10316, year_total#10324]
Arguments: hashpartitioning(customer_id#10316, 5), ENSURE_REQUIREMENTS, [id=#4642]

(98) Sort [codegen id : 46]
Input [2]: [customer_id#10316, year_total#10324]
Arguments: [customer_id#10316 ASC NULLS FIRST], false, 0

(99) SortMergeJoin [codegen id : 47]
Left keys [1]: [customer_id#9672]
Right keys [1]: [customer_id#10316]
Join condition: (CASE WHEN (year_total#10314 > 0E-17) THEN CheckOverflow((promote_precision(year_total#10324) / promote_precision(year_total#10314)), DecimalType(38,6), true) ELSE 0.000000 END > CASE WHEN (year_total#9680 > 0E-17) THEN CheckOverflow((promote_precision(year_total#10304) / promote_precision(year_total#9680)), DecimalType(38,6), true) ELSE 0.000000 END)

(100) Project [codegen id : 47]
Output [4]: [customer_id#10296, customer_first_name#10297, customer_last_name#10298, customer_preferred_cust_flag#10299]
Input [10]: [customer_id#9672, year_total#9680, customer_id#10296, customer_first_name#10297, customer_last_name#10298, customer_preferred_cust_flag#10299, year_total#10304, year_total#10314, customer_id#10316, year_total#10324]

(101) TakeOrderedAndProject
Input [4]: [customer_id#10296, customer_first_name#10297, customer_last_name#10298, customer_preferred_cust_flag#10299]
Arguments: 100, [customer_id#10296 ASC NULLS FIRST, customer_first_name#10297 ASC NULLS FIRST, customer_last_name#10298 ASC NULLS FIRST, customer_preferred_cust_flag#10299 ASC NULLS FIRST], [customer_id#10296, customer_first_name#10297, customer_last_name#10298, customer_preferred_cust_flag#10299]


Query q12

Spark SQL

select  i_item_id
      ,i_item_desc
      ,i_category
      ,i_class
      ,i_current_price
      ,sum(ws_ext_sales_price) as itemrevenue
      ,sum(ws_ext_sales_price)*100/sum(sum(ws_ext_sales_price)) over
          (partition by i_class) as revenueratio
from
	web_sales
    	,item
    	,date_dim
where
	ws_item_sk = i_item_sk
  	and trim(TRAILING from i_category) in ('Sports', 'Books', 'Home')
  	and ws_sold_date_sk = d_date_sk
	and d_date between cast('1999-02-22' as date)
                                and date_add(cast('1999-02-22' as date), 30 )
group by
	i_item_id
        ,i_item_desc
        ,i_category
        ,i_class
        ,i_current_price
order by
	i_category
        ,i_class
        ,i_item_id
        ,i_item_desc
        ,revenueratio
 limit 100;
 

Spark Plan with Pushdown turned on

Project (1)
+- BatchScan (2)

(2) BatchScan
Oracle Instance:
   DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
Pushdown Oracle SQL:
select "I_ITEM_ID", "I_ITEM_DESC", "I_CATEGORY", "I_CLASS", "I_CURRENT_PRICE", "itemrevenue", "revenueratio"
from ( select "I_ITEM_ID", "I_ITEM_DESC", "I_CATEGORY", "I_CLASS", "I_CURRENT_PRICE", "itemrevenue", (cast(("_w0" * 100.000000000000000000) as NUMBER(38, 18)) / "_we0") AS "revenueratio"
from ( select "I_ITEM_ID", "I_ITEM_DESC", "I_CATEGORY", "I_CLASS", "I_CURRENT_PRICE", "itemrevenue", "_w0", "_w1", SUM("_w1") OVER ( PARTITION BY "I_CLASS"   ) AS "_we0"
from ( select "I_ITEM_ID", "I_ITEM_DESC", "I_CATEGORY", "I_CLASS", "I_CURRENT_PRICE", SUM("WS_EXT_SALES_PRICE") AS "itemrevenue", SUM("WS_EXT_SALES_PRICE") AS "_w0", SUM("WS_EXT_SALES_PRICE") AS "_w1"
from TPCDS.WEB_SALES  join TPCDS.ITEM  on ("WS_ITEM_SK" = "I_ITEM_SK") join TPCDS.DATE_DIM  on ("WS_SOLD_DATE_SK" = "D_DATE_SK")
where (("WS_SOLD_DATE_SK" IS NOT NULL AND TRIM(TRAILING  FROM "I_CATEGORY") IN ( 'Sports', 'Books', 'Home' )) AND (("D_DATE" IS NOT NULL AND ("D_DATE" >= TRUNC(TIMESTAMP '1999-02-22 08:00:00.000000'))) AND ("D_DATE" <= TRUNC(TIMESTAMP '1999-03-24 08:00:00.000000'))))
group by "I_ITEM_ID", "I_ITEM_DESC", "I_CATEGORY", "I_CLASS", "I_CURRENT_PRICE" )  ) 
order by "I_CATEGORY" ASC NULLS FIRST, "I_CLASS" ASC NULLS FIRST, "I_ITEM_ID" ASC NULLS FIRST, "I_ITEM_DESC" ASC NULLS FIRST, "revenueratio" ASC NULLS FIRST ) 
where rownum <= 100
Pushdown Oracle SQL, oracle plan stats estimates:
rowCount = 100, bytes=26300
Pushdown Oracle SQL, Query Splitting details:
Query is not split

Spark Plan with Pushdown turned off

== Physical Plan ==
TakeOrderedAndProject (27)
+- * Project (26)
   +- Window (25)
      +- * Sort (24)
         +- Exchange (23)
            +- * HashAggregate (22)
               +- Exchange (21)
                  +- * HashAggregate (20)
                     +- * Project (19)
                        +- * SortMergeJoin Inner (18)
                           :- * Sort (12)
                           :  +- Exchange (11)
                           :     +- * Project (10)
                           :        +- * SortMergeJoin Inner (9)
                           :           :- * Sort (4)
                           :           :  +- Exchange (3)
                           :           :     +- * Project (2)
                           :           :        +- BatchScan (1)
                           :           +- * Sort (8)
                           :              +- Exchange (7)
                           :                 +- * Filter (6)
                           :                    +- BatchScan (5)
                           +- * Sort (17)
                              +- Exchange (16)
                                 +- * Project (15)
                                    +- * Filter (14)
                                       +- BatchScan (13)


(1) BatchScan
Output [3]: [WS_ITEM_SK#11352, WS_EXT_SALES_PRICE#11372, WS_SOLD_DATE_SK#11349]
Format: orafile
OraPlan: 00 OraTableScan TPCDS.WEB_SALES, [WS_ITEM_SK#11447, WS_EXT_SALES_PRICE#11448, WS_SOLD_DATE_SK#11449], [oracolumnref(WS_ITEM_SK#11447), oracolumnref(WS_EXT_SALES_PRICE#11448), oracolumnref(WS_SOLD_DATE_SK#11449)]
PartitionSchema: struct<WS_SOLD_DATE_SK:decimal(38,18)>
ReadSchema: struct<WS_ITEM_SK:decimal(38,18),WS_EXT_SALES_PRICE:decimal(38,18)>
dsKey: DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
oraPushdownSQL: select "WS_ITEM_SK", "WS_EXT_SALES_PRICE", "WS_SOLD_DATE_SK"
from TPCDS.WEB_SALES
where "WS_SOLD_DATE_SK" IS NOT NULL

(2) Project [codegen id : 1]
Output [3]: [WS_SOLD_DATE_SK#11349, WS_ITEM_SK#11352, WS_EXT_SALES_PRICE#11372]
Input [3]: [WS_ITEM_SK#11352, WS_EXT_SALES_PRICE#11372, WS_SOLD_DATE_SK#11349]

(3) Exchange
Input [3]: [WS_SOLD_DATE_SK#11349, WS_ITEM_SK#11352, WS_EXT_SALES_PRICE#11372]
Arguments: hashpartitioning(ws_item_sk#11352, 5), ENSURE_REQUIREMENTS, [id=#4981]

(4) Sort [codegen id : 2]
Input [3]: [WS_SOLD_DATE_SK#11349, WS_ITEM_SK#11352, WS_EXT_SALES_PRICE#11372]
Arguments: [ws_item_sk#11352 ASC NULLS FIRST], false, 0

(5) BatchScan
Output [6]: [I_ITEM_SK#11383, I_ITEM_ID#11384, I_ITEM_DESC#11387, I_CURRENT_PRICE#11388, I_CLASS#11393, I_CATEGORY#11395]
Format: orafile
OraPlan: 00 OraTableScan TPCDS.ITEM, [I_ITEM_SK#11453, I_ITEM_ID#11454, I_ITEM_DESC#11455, I_CURRENT_PRICE#11456, I_CLASS#11457, I_CATEGORY#11458], [oracolumnref(I_ITEM_SK#11453), oracolumnref(I_ITEM_ID#11454), oracolumnref(I_ITEM_DESC#11455), oracolumnref(I_CURRENT_PRICE#11456), oracolumnref(I_CLASS#11457), oracolumnref(I_CATEGORY#11458)], orain(rtrim(I_CATEGORY#11395, None) IN (Sports,Books,Home))
PartitionSchema: struct<>
ReadSchema: struct<I_ITEM_SK:decimal(38,18),I_ITEM_ID:string,I_ITEM_DESC:string,I_CURRENT_PRICE:decimal(38,18),I_CLASS:string,I_CATEGORY:string>
dsKey: DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
oraPushdownBindValues: Sports, Books, Home
oraPushdownSQL: select "I_ITEM_SK", "I_ITEM_ID", "I_ITEM_DESC", "I_CURRENT_PRICE", "I_CLASS", "I_CATEGORY"
from TPCDS.ITEM
where TRIM(TRAILING  FROM "I_CATEGORY") IN ( ?, ?, ? )

(6) Filter [codegen id : 3]
Input [6]: [I_ITEM_SK#11383, I_ITEM_ID#11384, I_ITEM_DESC#11387, I_CURRENT_PRICE#11388, I_CLASS#11393, I_CATEGORY#11395]
Condition : rtrim(I_CATEGORY#11395, None) IN (Sports,Books,Home)

(7) Exchange
Input [6]: [I_ITEM_SK#11383, I_ITEM_ID#11384, I_ITEM_DESC#11387, I_CURRENT_PRICE#11388, I_CLASS#11393, I_CATEGORY#11395]
Arguments: hashpartitioning(i_item_sk#11383, 5), ENSURE_REQUIREMENTS, [id=#4989]

(8) Sort [codegen id : 4]
Input [6]: [I_ITEM_SK#11383, I_ITEM_ID#11384, I_ITEM_DESC#11387, I_CURRENT_PRICE#11388, I_CLASS#11393, I_CATEGORY#11395]
Arguments: [i_item_sk#11383 ASC NULLS FIRST], false, 0

(9) SortMergeJoin [codegen id : 5]
Left keys [1]: [ws_item_sk#11352]
Right keys [1]: [i_item_sk#11383]
Join condition: None

(10) Project [codegen id : 5]
Output [7]: [WS_SOLD_DATE_SK#11349, WS_EXT_SALES_PRICE#11372, I_ITEM_ID#11384, I_ITEM_DESC#11387, I_CURRENT_PRICE#11388, I_CLASS#11393, I_CATEGORY#11395]
Input [9]: [WS_SOLD_DATE_SK#11349, WS_ITEM_SK#11352, WS_EXT_SALES_PRICE#11372, I_ITEM_SK#11383, I_ITEM_ID#11384, I_ITEM_DESC#11387, I_CURRENT_PRICE#11388, I_CLASS#11393, I_CATEGORY#11395]

(11) Exchange
Input [7]: [WS_SOLD_DATE_SK#11349, WS_EXT_SALES_PRICE#11372, I_ITEM_ID#11384, I_ITEM_DESC#11387, I_CURRENT_PRICE#11388, I_CLASS#11393, I_CATEGORY#11395]
Arguments: hashpartitioning(ws_sold_date_sk#11349, 5), ENSURE_REQUIREMENTS, [id=#4997]

(12) Sort [codegen id : 6]
Input [7]: [WS_SOLD_DATE_SK#11349, WS_EXT_SALES_PRICE#11372, I_ITEM_ID#11384, I_ITEM_DESC#11387, I_CURRENT_PRICE#11388, I_CLASS#11393, I_CATEGORY#11395]
Arguments: [ws_sold_date_sk#11349 ASC NULLS FIRST], false, 0

(13) BatchScan
Output [2]: [D_DATE_SK#11405, D_DATE#11407]
Format: orafile
OraPlan: 00 OraTableScan TPCDS.DATE_DIM, [D_DATE_SK#11465, D_DATE#11466], [oracolumnref(D_DATE_SK#11465), oracolumnref(D_DATE#11466)], orabinaryopexpression(((isnotnull(D_DATE#11407) AND (D_DATE#11407 >= 10644)) AND (D_DATE#11407 <= 10674)))
PartitionSchema: struct<>
ReadSchema: struct<D_DATE_SK:decimal(38,18),D_DATE:date>
dsKey: DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
oraPushdownBindValues: 10644, 10674
oraPushdownSQL: select "D_DATE_SK", "D_DATE"
from TPCDS.DATE_DIM
where (("D_DATE" IS NOT NULL AND ("D_DATE" >= ?)) AND ("D_DATE" <= ?))

(14) Filter [codegen id : 7]
Input [2]: [D_DATE_SK#11405, D_DATE#11407]
Condition : ((isnotnull(D_DATE#11407) AND (D_DATE#11407 >= 10644)) AND (D_DATE#11407 <= 10674))

(15) Project [codegen id : 7]
Output [1]: [D_DATE_SK#11405]
Input [2]: [D_DATE_SK#11405, D_DATE#11407]

(16) Exchange
Input [1]: [D_DATE_SK#11405]
Arguments: hashpartitioning(d_date_sk#11405, 5), ENSURE_REQUIREMENTS, [id=#5006]

(17) Sort [codegen id : 8]
Input [1]: [D_DATE_SK#11405]
Arguments: [d_date_sk#11405 ASC NULLS FIRST], false, 0

(18) SortMergeJoin [codegen id : 9]
Left keys [1]: [ws_sold_date_sk#11349]
Right keys [1]: [d_date_sk#11405]
Join condition: None

(19) Project [codegen id : 9]
Output [6]: [WS_EXT_SALES_PRICE#11372, I_ITEM_ID#11384, I_ITEM_DESC#11387, I_CURRENT_PRICE#11388, I_CLASS#11393, I_CATEGORY#11395]
Input [8]: [WS_SOLD_DATE_SK#11349, WS_EXT_SALES_PRICE#11372, I_ITEM_ID#11384, I_ITEM_DESC#11387, I_CURRENT_PRICE#11388, I_CLASS#11393, I_CATEGORY#11395, D_DATE_SK#11405]

(20) HashAggregate [codegen id : 9]
Input [6]: [WS_EXT_SALES_PRICE#11372, I_ITEM_ID#11384, I_ITEM_DESC#11387, I_CURRENT_PRICE#11388, I_CLASS#11393, I_CATEGORY#11395]
Keys [5]: [i_item_id#11384, i_item_desc#11387, i_category#11395, i_class#11393, i_current_price#11388]
Functions [1]: [partial_sum(ws_ext_sales_price#11372)]
Aggregate Attributes [2]: [sum#11469, isEmpty#11470]
Results [7]: [i_item_id#11384, i_item_desc#11387, i_category#11395, i_class#11393, i_current_price#11388, sum#11471, isEmpty#11472]

(21) Exchange
Input [7]: [i_item_id#11384, i_item_desc#11387, i_category#11395, i_class#11393, i_current_price#11388, sum#11471, isEmpty#11472]
Arguments: hashpartitioning(i_item_id#11384, i_item_desc#11387, i_category#11395, i_class#11393, i_current_price#11388, 5), ENSURE_REQUIREMENTS, [id=#5015]

(22) HashAggregate [codegen id : 10]
Input [7]: [i_item_id#11384, i_item_desc#11387, i_category#11395, i_class#11393, i_current_price#11388, sum#11471, isEmpty#11472]
Keys [5]: [i_item_id#11384, i_item_desc#11387, i_category#11395, i_class#11393, i_current_price#11388]
Functions [1]: [sum(ws_ext_sales_price#11372)]
Aggregate Attributes [1]: [sum(ws_ext_sales_price#11372)#11433]
Results [8]: [i_item_id#11384, i_item_desc#11387, i_category#11395, i_class#11393, i_current_price#11388, sum(ws_ext_sales_price#11372)#11433 AS itemrevenue#11347, sum(ws_ext_sales_price#11372)#11433 AS _w0#11437, sum(ws_ext_sales_price#11372)#11433 AS _w1#11438]

(23) Exchange
Input [8]: [i_item_id#11384, i_item_desc#11387, i_category#11395, i_class#11393, i_current_price#11388, itemrevenue#11347, _w0#11437, _w1#11438]
Arguments: hashpartitioning(i_class#11393, 5), ENSURE_REQUIREMENTS, [id=#5019]

(24) Sort [codegen id : 11]
Input [8]: [i_item_id#11384, i_item_desc#11387, i_category#11395, i_class#11393, i_current_price#11388, itemrevenue#11347, _w0#11437, _w1#11438]
Arguments: [i_class#11393 ASC NULLS FIRST], false, 0

(25) Window
Input [8]: [i_item_id#11384, i_item_desc#11387, i_category#11395, i_class#11393, i_current_price#11388, itemrevenue#11347, _w0#11437, _w1#11438]
Arguments: [sum(_w1#11438) windowspecdefinition(i_class#11393, specifiedwindowframe(RowFrame, unboundedpreceding$(), unboundedfollowing$())) AS _we0#11439], [i_class#11393]

(26) Project [codegen id : 12]
Output [7]: [i_item_id#11384, i_item_desc#11387, i_category#11395, i_class#11393, i_current_price#11388, itemrevenue#11347, CheckOverflow((promote_precision(cast(CheckOverflow((promote_precision(_w0#11437) * 100.000000000000000000), DecimalType(38,14), true) as decimal(38,18))) / promote_precision(_we0#11439)), DecimalType(38,6), true) AS revenueratio#11348]
Input [9]: [i_item_id#11384, i_item_desc#11387, i_category#11395, i_class#11393, i_current_price#11388, itemrevenue#11347, _w0#11437, _w1#11438, _we0#11439]

(27) TakeOrderedAndProject
Input [7]: [i_item_id#11384, i_item_desc#11387, i_category#11395, i_class#11393, i_current_price#11388, itemrevenue#11347, revenueratio#11348]
Arguments: 100, [i_category#11395 ASC NULLS FIRST, i_class#11393 ASC NULLS FIRST, i_item_id#11384 ASC NULLS FIRST, i_item_desc#11387 ASC NULLS FIRST, revenueratio#11348 ASC NULLS FIRST], [i_item_id#11384, i_item_desc#11387, i_category#11395, i_class#11393, i_current_price#11388, itemrevenue#11347, revenueratio#11348]


Query q13

Spark SQL

 select avg(ss_quantity)
       ,avg(ss_ext_sales_price)
       ,avg(ss_ext_wholesale_cost)
       ,sum(ss_ext_wholesale_cost)
 from store_sales
     ,store
     ,customer_demographics
     ,household_demographics
     ,customer_address
     ,date_dim
 where s_store_sk = ss_store_sk
 and  ss_sold_date_sk = d_date_sk and d_year = 2001
 and((ss_hdemo_sk=hd_demo_sk
  and cd_demo_sk = ss_cdemo_sk
  and cd_marital_status = 'M'
  and trim(TRAILING from cd_education_status) = 'Advanced Degree'
  and ss_sales_price between 100.00 and 150.00
  and hd_dep_count = 3
     )or
     (ss_hdemo_sk=hd_demo_sk
  and cd_demo_sk = ss_cdemo_sk
  and cd_marital_status = 'S'
  and trim(TRAILING from cd_education_status) = 'College'
  and ss_sales_price between 50.00 and 100.00
  and hd_dep_count = 1
     ) or
     (ss_hdemo_sk=hd_demo_sk
  and cd_demo_sk = ss_cdemo_sk
  and cd_marital_status = 'W'
  and trim(TRAILING from cd_education_status) = '2 yr Degree'
  and ss_sales_price between 150.00 and 200.00
  and hd_dep_count = 1
     ))
 and((ss_addr_sk = ca_address_sk
  and ca_country = 'United States'
  and ca_state in ('TX', 'OH', 'TX')
  and ss_net_profit between 100 and 200
     ) or
     (ss_addr_sk = ca_address_sk
  and ca_country = 'United States'
  and ca_state in ('OR', 'NM', 'KY')
  and ss_net_profit between 150 and 300
     ) or
     (ss_addr_sk = ca_address_sk
  and ca_country = 'United States'
  and ca_state in ('VA', 'TX', 'MS')
  and ss_net_profit between 50 and 250
     ))
; 

Spark Plan with Pushdown turned on

Project (1)
+- BatchScan (2)

(2) BatchScan
Oracle Instance:
   DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
Pushdown Oracle SQL:
select AVG("SS_QUANTITY") AS "avg(ss_quantity)", AVG("SS_EXT_SALES_PRICE") AS "avg(ss_ext_sales_price)", AVG("SS_EXT_WHOLESALE_COST") AS "avg(ss_ext_wholesale_cost)", SUM("SS_EXT_WHOLESALE_COST") AS "sum(ss_ext_wholesale_cost)"
from TPCDS.STORE_SALES  join TPCDS.STORE  on ("SS_STORE_SK" = "S_STORE_SK") join ( select "CA_ADDRESS_SK", "CA_STATE"
from TPCDS.CUSTOMER_ADDRESS 
where (("CA_COUNTRY" IS NOT NULL AND ("CA_COUNTRY" = 'United States')) AND (("CA_STATE" IN ( 'TX', 'OH' ) OR "CA_STATE" IN ( 'OR', 'NM', 'KY' )) OR "CA_STATE" IN ( 'VA', 'TX', 'MS' ))) )  on (("SS_ADDR_SK" = "CA_ADDRESS_SK") AND (((("CA_STATE" IN ( 'TX', 'OH' ) AND ("SS_NET_PROFIT" >= 100.000000000000000000)) AND ("SS_NET_PROFIT" <= 200.000000000000000000)) OR (("CA_STATE" IN ( 'OR', 'NM', 'KY' ) AND ("SS_NET_PROFIT" >= 150.000000000000000000)) AND ("SS_NET_PROFIT" <= 300.000000000000000000))) OR (("CA_STATE" IN ( 'VA', 'TX', 'MS' ) AND ("SS_NET_PROFIT" >= 50.000000000000000000)) AND ("SS_NET_PROFIT" <= 250.000000000000000000)))) join TPCDS.DATE_DIM  on ("SS_SOLD_DATE_SK" = "D_DATE_SK") join ( select "CD_DEMO_SK", "CD_MARITAL_STATUS", "CD_EDUCATION_STATUS"
from TPCDS.CUSTOMER_DEMOGRAPHICS 
where (((("CD_MARITAL_STATUS" = 'M') AND (TRIM(TRAILING  FROM "CD_EDUCATION_STATUS") = 'Advanced Degree')) OR (("CD_MARITAL_STATUS" = 'S') AND (TRIM(TRAILING  FROM "CD_EDUCATION_STATUS") = 'College'))) OR (("CD_MARITAL_STATUS" = 'W') AND (TRIM(TRAILING  FROM "CD_EDUCATION_STATUS") = '2 yr Degree'))) )  on (("SS_CDEMO_SK" = "CD_DEMO_SK") AND (((((("CD_MARITAL_STATUS" = 'M') AND (TRIM(TRAILING  FROM "CD_EDUCATION_STATUS") = 'Advanced Degree')) AND ("SS_SALES_PRICE" >= 100.000000000000000000)) AND ("SS_SALES_PRICE" <= 150.000000000000000000)) OR (((("CD_MARITAL_STATUS" = 'S') AND (TRIM(TRAILING  FROM "CD_EDUCATION_STATUS") = 'College')) AND ("SS_SALES_PRICE" >= 50.000000000000000000)) AND ("SS_SALES_PRICE" <= 100.000000000000000000))) OR (((("CD_MARITAL_STATUS" = 'W') AND (TRIM(TRAILING  FROM "CD_EDUCATION_STATUS") = '2 yr Degree')) AND ("SS_SALES_PRICE" >= 150.000000000000000000)) AND ("SS_SALES_PRICE" <= 200.000000000000000000)))) join ( select "HD_DEMO_SK", "HD_DEP_COUNT"
from TPCDS.HOUSEHOLD_DEMOGRAPHICS 
where ((("HD_DEP_COUNT" = 3.000000000000000000) OR ("HD_DEP_COUNT" = 1.000000000000000000)) OR ("HD_DEP_COUNT" = 1.000000000000000000)) )  on (("SS_HDEMO_SK" = "HD_DEMO_SK") AND ((((((("CD_MARITAL_STATUS" = 'M') AND (TRIM(TRAILING  FROM "CD_EDUCATION_STATUS") = 'Advanced Degree')) AND ("SS_SALES_PRICE" >= 100.000000000000000000)) AND ("SS_SALES_PRICE" <= 150.000000000000000000)) AND ("HD_DEP_COUNT" = 3.000000000000000000)) OR ((((("CD_MARITAL_STATUS" = 'S') AND (TRIM(TRAILING  FROM "CD_EDUCATION_STATUS") = 'College')) AND ("SS_SALES_PRICE" >= 50.000000000000000000)) AND ("SS_SALES_PRICE" <= 100.000000000000000000)) AND ("HD_DEP_COUNT" = 1.000000000000000000))) OR ((((("CD_MARITAL_STATUS" = 'W') AND (TRIM(TRAILING  FROM "CD_EDUCATION_STATUS") = '2 yr Degree')) AND ("SS_SALES_PRICE" >= 150.000000000000000000)) AND ("SS_SALES_PRICE" <= 200.000000000000000000)) AND ("HD_DEP_COUNT" = 1.000000000000000000))))
where ((((((("SS_STORE_SK" IS NOT NULL AND "SS_ADDR_SK" IS NOT NULL) AND "SS_CDEMO_SK" IS NOT NULL) AND "SS_HDEMO_SK" IS NOT NULL) AND (((("SS_NET_PROFIT" >= 100.000000000000000000) AND ("SS_NET_PROFIT" <= 200.000000000000000000)) OR (("SS_NET_PROFIT" >= 150.000000000000000000) AND ("SS_NET_PROFIT" <= 300.000000000000000000))) OR (("SS_NET_PROFIT" >= 50.000000000000000000) AND ("SS_NET_PROFIT" <= 250.000000000000000000)))) AND (((("SS_SALES_PRICE" >= 100.000000000000000000) AND ("SS_SALES_PRICE" <= 150.000000000000000000)) OR (("SS_SALES_PRICE" >= 50.000000000000000000) AND ("SS_SALES_PRICE" <= 100.000000000000000000))) OR (("SS_SALES_PRICE" >= 150.000000000000000000) AND ("SS_SALES_PRICE" <= 200.000000000000000000)))) AND "SS_SOLD_DATE_SK" IS NOT NULL) AND ("D_YEAR" IS NOT NULL AND ("D_YEAR" = 2001.000000000000000000)))
Pushdown Oracle SQL, oracle plan stats estimates:
rowCount = 1, bytes=135
Pushdown Oracle SQL, Query Splitting details:
Query is not split

Spark Plan with Pushdown turned off

== Physical Plan ==
* HashAggregate (36)
+- * HashAggregate (35)
   +- * Project (34)
      +- * SortMergeJoin Inner (33)
         :- * Sort (29)
         :  +- * Project (28)
         :     +- * SortMergeJoin Inner (27)
         :        :- * Sort (23)
         :        :  +- * Project (22)
         :        :     +- * SortMergeJoin Inner (21)
         :        :        :- * Sort (16)
         :        :        :  +- * Project (15)
         :        :        :     +- * SortMergeJoin Inner (14)
         :        :        :        :- * Sort (9)
         :        :        :        :  +- * Project (8)
         :        :        :        :     +- * SortMergeJoin Inner (7)
         :        :        :        :        :- * Sort (3)
         :        :        :        :        :  +- * Filter (2)
         :        :        :        :        :     +- BatchScan (1)
         :        :        :        :        +- * Sort (6)
         :        :        :        :           +- * Project (5)
         :        :        :        :              +- BatchScan (4)
         :        :        :        +- * Sort (13)
         :        :        :           +- * Project (12)
         :        :        :              +- * Filter (11)
         :        :        :                 +- BatchScan (10)
         :        :        +- * Sort (20)
         :        :           +- * Project (19)
         :        :              +- * Filter (18)
         :        :                 +- BatchScan (17)
         :        +- * Sort (26)
         :           +- * Filter (25)
         :              +- BatchScan (24)
         +- * Sort (32)
            +- * Filter (31)
               +- BatchScan (30)


(1) BatchScan
Output [10]: [SS_CDEMO_SK#11606, SS_HDEMO_SK#11607, SS_ADDR_SK#11608, SS_STORE_SK#11609, SS_QUANTITY#11612, SS_SALES_PRICE#11615, SS_EXT_SALES_PRICE#11617, SS_EXT_WHOLESALE_COST#11618, SS_NET_PROFIT#11624, SS_SOLD_DATE_SK#11602]
Format: orafile
OraPlan: 00 OraTableScan TPCDS.STORE_SALES, [SS_CDEMO_SK#11721, SS_HDEMO_SK#11722, SS_ADDR_SK#11723, SS_STORE_SK#11724, SS_QUANTITY#11725, SS_SALES_PRICE#11726, SS_EXT_SALES_PRICE#11727, SS_EXT_WHOLESALE_COST#11728, SS_NET_PROFIT#11729, SS_SOLD_DATE_SK#11730], [oracolumnref(SS_CDEMO_SK#11721), oracolumnref(SS_HDEMO_SK#11722), oracolumnref(SS_ADDR_SK#11723), oracolumnref(SS_STORE_SK#11724), oracolumnref(SS_QUANTITY#11725), oracolumnref(SS_SALES_PRICE#11726), oracolumnref(SS_EXT_SALES_PRICE#11727), oracolumnref(SS_EXT_WHOLESALE_COST#11728), oracolumnref(SS_NET_PROFIT#11729), oracolumnref(SS_SOLD_DATE_SK#11730)], orabinaryopexpression((((((isnotnull(SS_STORE_SK#11609) AND isnotnull(SS_ADDR_SK#11608)) AND isnotnull(SS_CDEMO_SK#11606)) AND isnotnull(SS_HDEMO_SK#11607)) AND ((((SS_NET_PROFIT#11624 >= 100.000000000000000000) AND (SS_NET_PROFIT#11624 <= 200.000000000000000000)) OR ((SS_NET_PROFIT#11624 >= 150.000000000000000000) AND (SS_NET_PROFIT#11624 <= 300.000000000000000000))) OR ((SS_NET_PROFIT#11624 >= 50.000000000000000000) AND (SS_NET_PROFIT#11624 <= 250.000000000000000000)))) AND ((((SS_SALES_PRICE#11615 >= 100.000000000000000000) AND (SS_SALES_PRICE#11615 <= 150.000000000000000000)) OR ((SS_SALES_PRICE#11615 >= 50.000000000000000000) AND (SS_SALES_PRICE#11615 <= 100.000000000000000000))) OR ((SS_SALES_PRICE#11615 >= 150.000000000000000000) AND (SS_SALES_PRICE#11615 <= 200.000000000000000000)))))
PartitionSchema: struct<SS_SOLD_DATE_SK:decimal(38,18)>
ReadSchema: struct<SS_CDEMO_SK:decimal(38,18),SS_HDEMO_SK:decimal(38,18),SS_ADDR_SK:decimal(38,18),SS_STORE_SK:decimal(38,18),SS_QUANTITY:decimal(38,18),SS_SALES_PRICE:decimal(38,18),SS_EXT_SALES_PRICE:decimal(38,18),SS_EXT_WHOLESALE_COST:decimal(38,18),SS_NET_PROFIT:decimal(38,18)>
dsKey: DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
oraPushdownBindValues: 100.000000000000000000, 200.000000000000000000, 150.000000000000000000, 300.000000000000000000, 50.000000000000000000, 250.000000000000000000, 100.000000000000000000, 150.000000000000000000, 50.000000000000000000, 100.000000000000000000, 150.000000000000000000, 200.000000000000000000
oraPushdownSQL: select "SS_CDEMO_SK", "SS_HDEMO_SK", "SS_ADDR_SK", "SS_STORE_SK", "SS_QUANTITY", "SS_SALES_PRICE", "SS_EXT_SALES_PRICE", "SS_EXT_WHOLESALE_COST", "SS_NET_PROFIT", "SS_SOLD_DATE_SK"
from TPCDS.STORE_SALES
where ((((("SS_STORE_SK" IS NOT NULL AND "SS_ADDR_SK" IS NOT NULL) AND "SS_CDEMO_SK" IS NOT NULL) AND "SS_HDEMO_SK" IS NOT NULL) AND (((("SS_NET_PROFIT" >= ?) AND ("SS_NET_PROFIT" <= ?)) OR (("SS_NET_PROFIT" >= ?) AND ("SS_NET_PROFIT" <= ?))) OR (("SS_NET_PROFIT" >= ?) AND ("SS_NET_PROFIT" <= ?)))) AND (((("SS_SALES_PRICE" >= ?) AND ("SS_SALES_PRICE" <= ?)) OR (("SS_SALES_PRICE" >= ?) AND ("SS_SALES_PRICE" <= ?))) OR (("SS_SALES_PRICE" >= ?) AND ("SS_SALES_PRICE" <= ?)))) and "SS_SOLD_DATE_SK" IS NOT NULL

(2) Filter [codegen id : 1]
Input [10]: [SS_CDEMO_SK#11606, SS_HDEMO_SK#11607, SS_ADDR_SK#11608, SS_STORE_SK#11609, SS_QUANTITY#11612, SS_SALES_PRICE#11615, SS_EXT_SALES_PRICE#11617, SS_EXT_WHOLESALE_COST#11618, SS_NET_PROFIT#11624, SS_SOLD_DATE_SK#11602]
Condition : (((((isnotnull(SS_STORE_SK#11609) AND isnotnull(SS_ADDR_SK#11608)) AND isnotnull(SS_CDEMO_SK#11606)) AND isnotnull(SS_HDEMO_SK#11607)) AND ((((SS_NET_PROFIT#11624 >= 100.000000000000000000) AND (SS_NET_PROFIT#11624 <= 200.000000000000000000)) OR ((SS_NET_PROFIT#11624 >= 150.000000000000000000) AND (SS_NET_PROFIT#11624 <= 300.000000000000000000))) OR ((SS_NET_PROFIT#11624 >= 50.000000000000000000) AND (SS_NET_PROFIT#11624 <= 250.000000000000000000)))) AND ((((SS_SALES_PRICE#11615 >= 100.000000000000000000) AND (SS_SALES_PRICE#11615 <= 150.000000000000000000)) OR ((SS_SALES_PRICE#11615 >= 50.000000000000000000) AND (SS_SALES_PRICE#11615 <= 100.000000000000000000))) OR ((SS_SALES_PRICE#11615 >= 150.000000000000000000) AND (SS_SALES_PRICE#11615 <= 200.000000000000000000))))

(3) Sort [codegen id : 1]
Input [10]: [SS_CDEMO_SK#11606, SS_HDEMO_SK#11607, SS_ADDR_SK#11608, SS_STORE_SK#11609, SS_QUANTITY#11612, SS_SALES_PRICE#11615, SS_EXT_SALES_PRICE#11617, SS_EXT_WHOLESALE_COST#11618, SS_NET_PROFIT#11624, SS_SOLD_DATE_SK#11602]
Arguments: [ss_store_sk#11609 ASC NULLS FIRST], false, 0

(4) BatchScan
Output [1]: [S_STORE_SK#11625]
Format: orafile
OraPlan: 00 OraTableScan TPCDS.STORE, [S_STORE_SK#11741], [oracolumnref(S_STORE_SK#11741)]
PartitionSchema: struct<>
ReadSchema: struct<S_STORE_SK:decimal(38,18)>
dsKey: DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
oraPushdownSQL: select "S_STORE_SK"
from TPCDS.STORE

(5) Project [codegen id : 2]
Output [1]: [S_STORE_SK#11625]
Input [1]: [S_STORE_SK#11625]

(6) Sort [codegen id : 2]
Input [1]: [S_STORE_SK#11625]
Arguments: [s_store_sk#11625 ASC NULLS FIRST], false, 0

(7) SortMergeJoin [codegen id : 3]
Left keys [1]: [ss_store_sk#11609]
Right keys [1]: [s_store_sk#11625]
Join condition: None

(8) Project [codegen id : 3]
Output [9]: [SS_SOLD_DATE_SK#11602, SS_CDEMO_SK#11606, SS_HDEMO_SK#11607, SS_ADDR_SK#11608, SS_QUANTITY#11612, SS_SALES_PRICE#11615, SS_EXT_SALES_PRICE#11617, SS_EXT_WHOLESALE_COST#11618, SS_NET_PROFIT#11624]
Input [11]: [SS_CDEMO_SK#11606, SS_HDEMO_SK#11607, SS_ADDR_SK#11608, SS_STORE_SK#11609, SS_QUANTITY#11612, SS_SALES_PRICE#11615, SS_EXT_SALES_PRICE#11617, SS_EXT_WHOLESALE_COST#11618, SS_NET_PROFIT#11624, SS_SOLD_DATE_SK#11602, S_STORE_SK#11625]

(9) Sort [codegen id : 3]
Input [9]: [SS_SOLD_DATE_SK#11602, SS_CDEMO_SK#11606, SS_HDEMO_SK#11607, SS_ADDR_SK#11608, SS_QUANTITY#11612, SS_SALES_PRICE#11615, SS_EXT_SALES_PRICE#11617, SS_EXT_WHOLESALE_COST#11618, SS_NET_PROFIT#11624]
Arguments: [ss_addr_sk#11608 ASC NULLS FIRST], false, 0

(10) BatchScan
Output [3]: [CA_ADDRESS_SK#11668, CA_STATE#11676, CA_COUNTRY#11678]
Format: orafile
OraPlan: 00 OraTableScan TPCDS.CUSTOMER_ADDRESS, [CA_ADDRESS_SK#11743, CA_STATE#11744, CA_COUNTRY#11745], [oracolumnref(CA_ADDRESS_SK#11743), oracolumnref(CA_STATE#11744), oracolumnref(CA_COUNTRY#11745)], orabinaryopexpression(((isnotnull(CA_COUNTRY#11678) AND (CA_COUNTRY#11678 = United States)) AND ((CA_STATE#11676 IN (TX,OH) OR CA_STATE#11676 IN (OR,NM,KY)) OR CA_STATE#11676 IN (VA,TX,MS))))
PartitionSchema: struct<>
ReadSchema: struct<CA_ADDRESS_SK:decimal(38,18),CA_STATE:string,CA_COUNTRY:string>
dsKey: DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
oraPushdownBindValues: United States, TX, OH, OR, NM, KY, VA, TX, MS
oraPushdownSQL: select "CA_ADDRESS_SK", "CA_STATE", "CA_COUNTRY"
from TPCDS.CUSTOMER_ADDRESS
where (("CA_COUNTRY" IS NOT NULL AND ("CA_COUNTRY" = ?)) AND (("CA_STATE" IN ( ?, ? ) OR "CA_STATE" IN ( ?, ?, ? )) OR "CA_STATE" IN ( ?, ?, ? )))

(11) Filter [codegen id : 4]
Input [3]: [CA_ADDRESS_SK#11668, CA_STATE#11676, CA_COUNTRY#11678]
Condition : ((isnotnull(CA_COUNTRY#11678) AND (CA_COUNTRY#11678 = United States)) AND ((CA_STATE#11676 IN (TX,OH) OR CA_STATE#11676 IN (OR,NM,KY)) OR CA_STATE#11676 IN (VA,TX,MS)))

(12) Project [codegen id : 4]
Output [2]: [CA_ADDRESS_SK#11668, CA_STATE#11676]
Input [3]: [CA_ADDRESS_SK#11668, CA_STATE#11676, CA_COUNTRY#11678]

(13) Sort [codegen id : 4]
Input [2]: [CA_ADDRESS_SK#11668, CA_STATE#11676]
Arguments: [ca_address_sk#11668 ASC NULLS FIRST], false, 0

(14) SortMergeJoin [codegen id : 5]
Left keys [1]: [ss_addr_sk#11608]
Right keys [1]: [ca_address_sk#11668]
Join condition: ((((ca_state#11676 IN (TX,OH) AND (ss_net_profit#11624 >= 100.000000000000000000)) AND (ss_net_profit#11624 <= 200.000000000000000000)) OR ((ca_state#11676 IN (OR,NM,KY) AND (ss_net_profit#11624 >= 150.000000000000000000)) AND (ss_net_profit#11624 <= 300.000000000000000000))) OR ((ca_state#11676 IN (VA,TX,MS) AND (ss_net_profit#11624 >= 50.000000000000000000)) AND (ss_net_profit#11624 <= 250.000000000000000000)))

(15) Project [codegen id : 5]
Output [7]: [SS_SOLD_DATE_SK#11602, SS_CDEMO_SK#11606, SS_HDEMO_SK#11607, SS_QUANTITY#11612, SS_SALES_PRICE#11615, SS_EXT_SALES_PRICE#11617, SS_EXT_WHOLESALE_COST#11618]
Input [11]: [SS_SOLD_DATE_SK#11602, SS_CDEMO_SK#11606, SS_HDEMO_SK#11607, SS_ADDR_SK#11608, SS_QUANTITY#11612, SS_SALES_PRICE#11615, SS_EXT_SALES_PRICE#11617, SS_EXT_WHOLESALE_COST#11618, SS_NET_PROFIT#11624, CA_ADDRESS_SK#11668, CA_STATE#11676]

(16) Sort [codegen id : 5]
Input [7]: [SS_SOLD_DATE_SK#11602, SS_CDEMO_SK#11606, SS_HDEMO_SK#11607, SS_QUANTITY#11612, SS_SALES_PRICE#11615, SS_EXT_SALES_PRICE#11617, SS_EXT_WHOLESALE_COST#11618]
Arguments: [ss_sold_date_sk#11602 ASC NULLS FIRST], false, 0

(17) BatchScan
Output [2]: [D_DATE_SK#11681, D_YEAR#11687]
Format: orafile
OraPlan: 00 OraTableScan TPCDS.DATE_DIM, [D_DATE_SK#11749, D_YEAR#11750], [oracolumnref(D_DATE_SK#11749), oracolumnref(D_YEAR#11750)], orabinaryopexpression((isnotnull(D_YEAR#11687) AND (D_YEAR#11687 = 2001.000000000000000000)))
PartitionSchema: struct<>
ReadSchema: struct<D_DATE_SK:decimal(38,18),D_YEAR:decimal(38,18)>
dsKey: DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
oraPushdownBindValues: 2001.000000000000000000
oraPushdownSQL: select "D_DATE_SK", "D_YEAR"
from TPCDS.DATE_DIM
where ("D_YEAR" IS NOT NULL AND ("D_YEAR" = ?))

(18) Filter [codegen id : 6]
Input [2]: [D_DATE_SK#11681, D_YEAR#11687]
Condition : (isnotnull(D_YEAR#11687) AND (D_YEAR#11687 = 2001.000000000000000000))

(19) Project [codegen id : 6]
Output [1]: [D_DATE_SK#11681]
Input [2]: [D_DATE_SK#11681, D_YEAR#11687]

(20) Sort [codegen id : 6]
Input [1]: [D_DATE_SK#11681]
Arguments: [d_date_sk#11681 ASC NULLS FIRST], false, 0

(21) SortMergeJoin [codegen id : 7]
Left keys [1]: [ss_sold_date_sk#11602]
Right keys [1]: [d_date_sk#11681]
Join condition: None

(22) Project [codegen id : 7]
Output [6]: [SS_CDEMO_SK#11606, SS_HDEMO_SK#11607, SS_QUANTITY#11612, SS_SALES_PRICE#11615, SS_EXT_SALES_PRICE#11617, SS_EXT_WHOLESALE_COST#11618]
Input [8]: [SS_SOLD_DATE_SK#11602, SS_CDEMO_SK#11606, SS_HDEMO_SK#11607, SS_QUANTITY#11612, SS_SALES_PRICE#11615, SS_EXT_SALES_PRICE#11617, SS_EXT_WHOLESALE_COST#11618, D_DATE_SK#11681]

(23) Sort [codegen id : 7]
Input [6]: [SS_CDEMO_SK#11606, SS_HDEMO_SK#11607, SS_QUANTITY#11612, SS_SALES_PRICE#11615, SS_EXT_SALES_PRICE#11617, SS_EXT_WHOLESALE_COST#11618]
Arguments: [ss_cdemo_sk#11606 ASC NULLS FIRST], false, 0

(24) BatchScan
Output [3]: [CD_DEMO_SK#11654, CD_MARITAL_STATUS#11656, CD_EDUCATION_STATUS#11657]
Format: orafile
OraPlan: 00 OraTableScan TPCDS.CUSTOMER_DEMOGRAPHICS, [CD_DEMO_SK#11753, CD_MARITAL_STATUS#11754, CD_EDUCATION_STATUS#11755], [oracolumnref(CD_DEMO_SK#11753), oracolumnref(CD_MARITAL_STATUS#11754), oracolumnref(CD_EDUCATION_STATUS#11755)], orabinaryopexpression(((((CD_MARITAL_STATUS#11656 = M) AND (rtrim(CD_EDUCATION_STATUS#11657, None) = Advanced Degree)) OR ((CD_MARITAL_STATUS#11656 = S) AND (rtrim(CD_EDUCATION_STATUS#11657, None) = College))) OR ((CD_MARITAL_STATUS#11656 = W) AND (rtrim(CD_EDUCATION_STATUS#11657, None) = 2 yr Degree))))
PartitionSchema: struct<>
ReadSchema: struct<CD_DEMO_SK:decimal(38,18),CD_MARITAL_STATUS:string,CD_EDUCATION_STATUS:string>
dsKey: DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
oraPushdownBindValues: M, Advanced Degree, S, College, W, 2 yr Degree
oraPushdownSQL: select "CD_DEMO_SK", "CD_MARITAL_STATUS", "CD_EDUCATION_STATUS"
from TPCDS.CUSTOMER_DEMOGRAPHICS
where (((("CD_MARITAL_STATUS" = ?) AND (TRIM(TRAILING  FROM "CD_EDUCATION_STATUS") = ?)) OR (("CD_MARITAL_STATUS" = ?) AND (TRIM(TRAILING  FROM "CD_EDUCATION_STATUS") = ?))) OR (("CD_MARITAL_STATUS" = ?) AND (TRIM(TRAILING  FROM "CD_EDUCATION_STATUS") = ?)))

(25) Filter [codegen id : 8]
Input [3]: [CD_DEMO_SK#11654, CD_MARITAL_STATUS#11656, CD_EDUCATION_STATUS#11657]
Condition : ((((CD_MARITAL_STATUS#11656 = M) AND (rtrim(CD_EDUCATION_STATUS#11657, None) = Advanced Degree)) OR ((CD_MARITAL_STATUS#11656 = S) AND (rtrim(CD_EDUCATION_STATUS#11657, None) = College))) OR ((CD_MARITAL_STATUS#11656 = W) AND (rtrim(CD_EDUCATION_STATUS#11657, None) = 2 yr Degree)))

(26) Sort [codegen id : 8]
Input [3]: [CD_DEMO_SK#11654, CD_MARITAL_STATUS#11656, CD_EDUCATION_STATUS#11657]
Arguments: [cd_demo_sk#11654 ASC NULLS FIRST], false, 0

(27) SortMergeJoin [codegen id : 9]
Left keys [1]: [ss_cdemo_sk#11606]
Right keys [1]: [cd_demo_sk#11654]
Join condition: ((((((cd_marital_status#11656 = M) AND (rtrim(cd_education_status#11657, None) = Advanced Degree)) AND (ss_sales_price#11615 >= 100.000000000000000000)) AND (ss_sales_price#11615 <= 150.000000000000000000)) OR ((((cd_marital_status#11656 = S) AND (rtrim(cd_education_status#11657, None) = College)) AND (ss_sales_price#11615 >= 50.000000000000000000)) AND (ss_sales_price#11615 <= 100.000000000000000000))) OR ((((cd_marital_status#11656 = W) AND (rtrim(cd_education_status#11657, None) = 2 yr Degree)) AND (ss_sales_price#11615 >= 150.000000000000000000)) AND (ss_sales_price#11615 <= 200.000000000000000000)))

(28) Project [codegen id : 9]
Output [7]: [SS_HDEMO_SK#11607, SS_QUANTITY#11612, SS_SALES_PRICE#11615, SS_EXT_SALES_PRICE#11617, SS_EXT_WHOLESALE_COST#11618, CD_MARITAL_STATUS#11656, CD_EDUCATION_STATUS#11657]
Input [9]: [SS_CDEMO_SK#11606, SS_HDEMO_SK#11607, SS_QUANTITY#11612, SS_SALES_PRICE#11615, SS_EXT_SALES_PRICE#11617, SS_EXT_WHOLESALE_COST#11618, CD_DEMO_SK#11654, CD_MARITAL_STATUS#11656, CD_EDUCATION_STATUS#11657]

(29) Sort [codegen id : 9]
Input [7]: [SS_HDEMO_SK#11607, SS_QUANTITY#11612, SS_SALES_PRICE#11615, SS_EXT_SALES_PRICE#11617, SS_EXT_WHOLESALE_COST#11618, CD_MARITAL_STATUS#11656, CD_EDUCATION_STATUS#11657]
Arguments: [ss_hdemo_sk#11607 ASC NULLS FIRST], false, 0

(30) BatchScan
Output [2]: [HD_DEMO_SK#11663, HD_DEP_COUNT#11666]
Format: orafile
OraPlan: 00 OraTableScan TPCDS.HOUSEHOLD_DEMOGRAPHICS, [HD_DEMO_SK#11759, HD_DEP_COUNT#11760], [oracolumnref(HD_DEMO_SK#11759), oracolumnref(HD_DEP_COUNT#11760)], orabinaryopexpression((((HD_DEP_COUNT#11666 = 3.000000000000000000) OR (HD_DEP_COUNT#11666 = 1.000000000000000000)) OR (HD_DEP_COUNT#11666 = 1.000000000000000000)))
PartitionSchema: struct<>
ReadSchema: struct<HD_DEMO_SK:decimal(38,18),HD_DEP_COUNT:decimal(38,18)>
dsKey: DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
oraPushdownBindValues: 3.000000000000000000, 1.000000000000000000, 1.000000000000000000
oraPushdownSQL: select "HD_DEMO_SK", "HD_DEP_COUNT"
from TPCDS.HOUSEHOLD_DEMOGRAPHICS
where ((("HD_DEP_COUNT" = ?) OR ("HD_DEP_COUNT" = ?)) OR ("HD_DEP_COUNT" = ?))

(31) Filter [codegen id : 10]
Input [2]: [HD_DEMO_SK#11663, HD_DEP_COUNT#11666]
Condition : (((HD_DEP_COUNT#11666 = 3.000000000000000000) OR (HD_DEP_COUNT#11666 = 1.000000000000000000)) OR (HD_DEP_COUNT#11666 = 1.000000000000000000))

(32) Sort [codegen id : 10]
Input [2]: [HD_DEMO_SK#11663, HD_DEP_COUNT#11666]
Arguments: [hd_demo_sk#11663 ASC NULLS FIRST], false, 0

(33) SortMergeJoin [codegen id : 11]
Left keys [1]: [ss_hdemo_sk#11607]
Right keys [1]: [hd_demo_sk#11663]
Join condition: (((((((cd_marital_status#11656 = M) AND (rtrim(cd_education_status#11657, None) = Advanced Degree)) AND (ss_sales_price#11615 >= 100.000000000000000000)) AND (ss_sales_price#11615 <= 150.000000000000000000)) AND (hd_dep_count#11666 = 3.000000000000000000)) OR (((((cd_marital_status#11656 = S) AND (rtrim(cd_education_status#11657, None) = College)) AND (ss_sales_price#11615 >= 50.000000000000000000)) AND (ss_sales_price#11615 <= 100.000000000000000000)) AND (hd_dep_count#11666 = 1.000000000000000000))) OR (((((cd_marital_status#11656 = W) AND (rtrim(cd_education_status#11657, None) = 2 yr Degree)) AND (ss_sales_price#11615 >= 150.000000000000000000)) AND (ss_sales_price#11615 <= 200.000000000000000000)) AND (hd_dep_count#11666 = 1.000000000000000000)))

(34) Project [codegen id : 11]
Output [3]: [SS_QUANTITY#11612, SS_EXT_SALES_PRICE#11617, SS_EXT_WHOLESALE_COST#11618]
Input [9]: [SS_HDEMO_SK#11607, SS_QUANTITY#11612, SS_SALES_PRICE#11615, SS_EXT_SALES_PRICE#11617, SS_EXT_WHOLESALE_COST#11618, CD_MARITAL_STATUS#11656, CD_EDUCATION_STATUS#11657, HD_DEMO_SK#11663, HD_DEP_COUNT#11666]

(35) HashAggregate [codegen id : 11]
Input [3]: [SS_QUANTITY#11612, SS_EXT_SALES_PRICE#11617, SS_EXT_WHOLESALE_COST#11618]
Keys: []
Functions [4]: [partial_avg(ss_quantity#11612), partial_avg(ss_ext_sales_price#11617), partial_avg(ss_ext_wholesale_cost#11618), partial_sum(ss_ext_wholesale_cost#11618)]
Aggregate Attributes [8]: [sum#11763, count#11764L, sum#11765, count#11766L, sum#11767, count#11768L, sum#11769, isEmpty#11770]
Results [8]: [sum#11771, count#11772L, sum#11773, count#11774L, sum#11775, count#11776L, sum#11777, isEmpty#11778]

(36) HashAggregate [codegen id : 11]
Input [8]: [sum#11771, count#11772L, sum#11773, count#11774L, sum#11775, count#11776L, sum#11777, isEmpty#11778]
Keys: []
Functions [4]: [avg(ss_quantity#11612), avg(ss_ext_sales_price#11617), avg(ss_ext_wholesale_cost#11618), sum(ss_ext_wholesale_cost#11618)]
Aggregate Attributes [4]: [avg(ss_quantity#11612)#11709, avg(ss_ext_sales_price#11617)#11710, avg(ss_ext_wholesale_cost#11618)#11711, sum(ss_ext_wholesale_cost#11618)#11712]
Results [4]: [avg(ss_quantity#11612)#11709 AS avg(ss_quantity)#11713, avg(ss_ext_sales_price#11617)#11710 AS avg(ss_ext_sales_price)#11714, avg(ss_ext_wholesale_cost#11618)#11711 AS avg(ss_ext_wholesale_cost)#11715, sum(ss_ext_wholesale_cost#11618)#11712 AS sum(ss_ext_wholesale_cost)#11716]


Query q14-1

Spark SQL

 with cross_items as
 (select i_item_sk ss_item_sk
 from item,
 (select iss.i_brand_id brand_id
     ,iss.i_class_id class_id
     ,iss.i_category_id category_id
 from store_sales
     ,item iss
     ,date_dim d1
 where ss_item_sk = iss.i_item_sk
   and ss_sold_date_sk = d1.d_date_sk
   and d1.d_year between 1999 AND 1999 + 2
 intersect
 select ics.i_brand_id
     ,ics.i_class_id
     ,ics.i_category_id
 from catalog_sales
     ,item ics
     ,date_dim d2
 where cs_item_sk = ics.i_item_sk
   and cs_sold_date_sk = d2.d_date_sk
   and d2.d_year between 1999 AND 1999 + 2
 intersect
 select iws.i_brand_id
     ,iws.i_class_id
     ,iws.i_category_id
 from web_sales
     ,item iws
     ,date_dim d3
 where ws_item_sk = iws.i_item_sk
   and ws_sold_date_sk = d3.d_date_sk
   and d3.d_year between 1999 AND 1999 + 2)
 where i_brand_id = brand_id
      and i_class_id = class_id
      and i_category_id = category_id
),
 avg_sales as
 (select avg(quantity*list_price) average_sales
  from (select ss_quantity quantity
             ,ss_list_price list_price
       from store_sales
           ,date_dim
       where ss_sold_date_sk = d_date_sk
         and d_year between 1999 and 1999 + 2
       union all
       select cs_quantity quantity
             ,cs_list_price list_price
       from catalog_sales
           ,date_dim
       where cs_sold_date_sk = d_date_sk
         and d_year between 1999 and 1999 + 2
       union all
       select ws_quantity quantity
             ,ws_list_price list_price
       from web_sales
           ,date_dim
       where ws_sold_date_sk = d_date_sk
         and d_year between 1999 and 1999 + 2) x)
  select  channel, i_brand_id,i_class_id,i_category_id,sum(sales), sum(number_sales)
 from(
       select 'store' channel, i_brand_id,i_class_id
             ,i_category_id,sum(ss_quantity*ss_list_price) sales
             , count(*) number_sales
       from store_sales
           ,item
           ,date_dim
       where ss_item_sk in (select ss_item_sk from cross_items)
         and ss_item_sk = i_item_sk
         and ss_sold_date_sk = d_date_sk
         and d_year = 1999+2
         and d_moy = 11
       group by i_brand_id,i_class_id,i_category_id
       having sum(ss_quantity*ss_list_price) > (select average_sales from avg_sales)
       union all
       select 'catalog' channel, i_brand_id,i_class_id,i_category_id, sum(cs_quantity*cs_list_price) sales, count(*) number_sales
       from catalog_sales
           ,item
           ,date_dim
       where cs_item_sk in (select ss_item_sk from cross_items)
         and cs_item_sk = i_item_sk
         and cs_sold_date_sk = d_date_sk
         and d_year = 1999+2
         and d_moy = 11
       group by i_brand_id,i_class_id,i_category_id
       having sum(cs_quantity*cs_list_price) > (select average_sales from avg_sales)
       union all
       select 'web' channel, i_brand_id,i_class_id,i_category_id, sum(ws_quantity*ws_list_price) sales , count(*) number_sales
       from web_sales
           ,item
           ,date_dim
       where ws_item_sk in (select ss_item_sk from cross_items)
         and ws_item_sk = i_item_sk
         and ws_sold_date_sk = d_date_sk
         and d_year = 1999+2
         and d_moy = 11
       group by i_brand_id,i_class_id,i_category_id
       having sum(ws_quantity*ws_list_price) > (select average_sales from avg_sales)
 ) y
 group by rollup (channel, i_brand_id,i_class_id,i_category_id)
 order by channel,i_brand_id,i_class_id,i_category_id
  limit 100; 

Spark Plan with Pushdown turned on

Project (1)
+- BatchScan (2)

(2) BatchScan
Oracle Instance:
   DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
Pushdown Oracle SQL:
select "channel_7_sparkora", "i_brand_id_8_sparkora", "i_class_id_10_sparkora", "i_category_id_11_sparkora", "sum(sales)", "sum(number_sales)"
from ( select "channel_7_sparkora", "i_brand_id_8_sparkora", "i_class_id_10_sparkora", "i_category_id_11_sparkora", SUM("sales") AS "sum(sales)", SUM("number_sales") AS "sum(number_sales)"
from ( select "sales", "number_sales", 'store' AS "channel", "I_BRAND_ID", "I_CLASS_ID", "I_CATEGORY_ID"
from ( select "I_BRAND_ID", "I_CLASS_ID", "I_CATEGORY_ID", SUM(("SS_QUANTITY" * "SS_LIST_PRICE")) AS "sales", COUNT(1) AS "number_sales", SUM(("SS_QUANTITY" * "SS_LIST_PRICE")) AS "1_sparkora"
from TPCDS.STORE_SALES  join TPCDS.ITEM  on ("SS_ITEM_SK" = "I_ITEM_SK") join TPCDS.DATE_DIM  on ("SS_SOLD_DATE_SK" = "D_DATE_SK")
where ((("SS_SOLD_DATE_SK" IS NOT NULL AND  "SS_ITEM_SK" IN ( select "I_ITEM_SK"
from TPCDS.ITEM  join ( select "brand_id", "class_id", "category_id"
from ( select "brand_id", "class_id", "category_id"
from ( select "I_BRAND_ID" AS "brand_id", "I_CLASS_ID" AS "class_id", "I_CATEGORY_ID" AS "category_id"
from TPCDS.STORE_SALES  join TPCDS.ITEM  on ("SS_ITEM_SK" = "I_ITEM_SK") join TPCDS.DATE_DIM  on ("SS_SOLD_DATE_SK" = "D_DATE_SK")
where (("SS_SOLD_DATE_SK" IS NOT NULL AND (((("I_BRAND_ID" IS NOT NULL AND "I_CLASS_ID" IS NOT NULL) AND "I_CATEGORY_ID" IS NOT NULL) AND  (COALESCE("I_BRAND_ID" , 0E-18), CASE WHEN "I_BRAND_ID" IS NULL THEN 1 ELSE 0 END, COALESCE("I_CLASS_ID" , 0E-18), CASE WHEN "I_CLASS_ID" IS NULL THEN 1 ELSE 0 END, COALESCE("I_CATEGORY_ID" , 0E-18), CASE WHEN "I_CATEGORY_ID" IS NULL THEN 1 ELSE 0 END) IN ( select COALESCE("I_BRAND_ID" , 0E-18), CASE WHEN "I_BRAND_ID" IS NULL THEN 1 ELSE 0 END, COALESCE("I_CLASS_ID" , 0E-18), CASE WHEN "I_CLASS_ID" IS NULL THEN 1 ELSE 0 END, COALESCE("I_CATEGORY_ID" , 0E-18), CASE WHEN "I_CATEGORY_ID" IS NULL THEN 1 ELSE 0 END
from TPCDS.CATALOG_SALES  join TPCDS.ITEM  on ("CS_ITEM_SK" = "I_ITEM_SK") join TPCDS.DATE_DIM  on ("CS_SOLD_DATE_SK" = "D_DATE_SK")
where ("CS_SOLD_DATE_SK" IS NOT NULL AND (("D_YEAR" IS NOT NULL AND ("D_YEAR" >= 1999.000000000000000000)) AND ("D_YEAR" <= 2001.000000000000000000))) )) AND  (COALESCE("I_BRAND_ID" , 0E-18), CASE WHEN "I_BRAND_ID" IS NULL THEN 1 ELSE 0 END, COALESCE("I_CLASS_ID" , 0E-18), CASE WHEN "I_CLASS_ID" IS NULL THEN 1 ELSE 0 END, COALESCE("I_CATEGORY_ID" , 0E-18), CASE WHEN "I_CATEGORY_ID" IS NULL THEN 1 ELSE 0 END) IN ( select COALESCE("I_BRAND_ID" , 0E-18), CASE WHEN "I_BRAND_ID" IS NULL THEN 1 ELSE 0 END, COALESCE("I_CLASS_ID" , 0E-18), CASE WHEN "I_CLASS_ID" IS NULL THEN 1 ELSE 0 END, COALESCE("I_CATEGORY_ID" , 0E-18), CASE WHEN "I_CATEGORY_ID" IS NULL THEN 1 ELSE 0 END
from TPCDS.WEB_SALES  join TPCDS.ITEM  on ("WS_ITEM_SK" = "I_ITEM_SK") join TPCDS.DATE_DIM  on ("WS_SOLD_DATE_SK" = "D_DATE_SK")
where ("WS_SOLD_DATE_SK" IS NOT NULL AND (("D_YEAR" IS NOT NULL AND ("D_YEAR" >= 1999.000000000000000000)) AND ("D_YEAR" <= 2001.000000000000000000))) ))) AND (("D_YEAR" IS NOT NULL AND ("D_YEAR" >= 1999.000000000000000000)) AND ("D_YEAR" <= 2001.000000000000000000))) ) 
group by "brand_id", "class_id", "category_id" ) 
group by "brand_id", "class_id", "category_id" )  on ((("I_BRAND_ID" = "brand_id") AND ("I_CLASS_ID" = "class_id")) AND ("I_CATEGORY_ID" = "category_id"))
where (("I_BRAND_ID" IS NOT NULL AND "I_CLASS_ID" IS NOT NULL) AND "I_CATEGORY_ID" IS NOT NULL) )) AND  "I_ITEM_SK" IN ( select "I_ITEM_SK"
from TPCDS.ITEM  join ( select "brand_id", "class_id", "category_id"
from ( select "brand_id", "class_id", "category_id"
from ( select "I_BRAND_ID" AS "brand_id", "I_CLASS_ID" AS "class_id", "I_CATEGORY_ID" AS "category_id"
from TPCDS.STORE_SALES  join TPCDS.ITEM  on ("SS_ITEM_SK" = "I_ITEM_SK") join TPCDS.DATE_DIM  on ("SS_SOLD_DATE_SK" = "D_DATE_SK")
where (("SS_SOLD_DATE_SK" IS NOT NULL AND (((("I_BRAND_ID" IS NOT NULL AND "I_CLASS_ID" IS NOT NULL) AND "I_CATEGORY_ID" IS NOT NULL) AND  (COALESCE("I_BRAND_ID" , 0E-18), CASE WHEN "I_BRAND_ID" IS NULL THEN 1 ELSE 0 END, COALESCE("I_CLASS_ID" , 0E-18), CASE WHEN "I_CLASS_ID" IS NULL THEN 1 ELSE 0 END, COALESCE("I_CATEGORY_ID" , 0E-18), CASE WHEN "I_CATEGORY_ID" IS NULL THEN 1 ELSE 0 END) IN ( select COALESCE("I_BRAND_ID" , 0E-18), CASE WHEN "I_BRAND_ID" IS NULL THEN 1 ELSE 0 END, COALESCE("I_CLASS_ID" , 0E-18), CASE WHEN "I_CLASS_ID" IS NULL THEN 1 ELSE 0 END, COALESCE("I_CATEGORY_ID" , 0E-18), CASE WHEN "I_CATEGORY_ID" IS NULL THEN 1 ELSE 0 END
from TPCDS.CATALOG_SALES  join TPCDS.ITEM  on ("CS_ITEM_SK" = "I_ITEM_SK") join TPCDS.DATE_DIM  on ("CS_SOLD_DATE_SK" = "D_DATE_SK")
where ("CS_SOLD_DATE_SK" IS NOT NULL AND (("D_YEAR" IS NOT NULL AND ("D_YEAR" >= 1999.000000000000000000)) AND ("D_YEAR" <= 2001.000000000000000000))) )) AND  (COALESCE("I_BRAND_ID" , 0E-18), CASE WHEN "I_BRAND_ID" IS NULL THEN 1 ELSE 0 END, COALESCE("I_CLASS_ID" , 0E-18), CASE WHEN "I_CLASS_ID" IS NULL THEN 1 ELSE 0 END, COALESCE("I_CATEGORY_ID" , 0E-18), CASE WHEN "I_CATEGORY_ID" IS NULL THEN 1 ELSE 0 END) IN ( select COALESCE("I_BRAND_ID" , 0E-18), CASE WHEN "I_BRAND_ID" IS NULL THEN 1 ELSE 0 END, COALESCE("I_CLASS_ID" , 0E-18), CASE WHEN "I_CLASS_ID" IS NULL THEN 1 ELSE 0 END, COALESCE("I_CATEGORY_ID" , 0E-18), CASE WHEN "I_CATEGORY_ID" IS NULL THEN 1 ELSE 0 END
from TPCDS.WEB_SALES  join TPCDS.ITEM  on ("WS_ITEM_SK" = "I_ITEM_SK") join TPCDS.DATE_DIM  on ("WS_SOLD_DATE_SK" = "D_DATE_SK")
where ("WS_SOLD_DATE_SK" IS NOT NULL AND (("D_YEAR" IS NOT NULL AND ("D_YEAR" >= 1999.000000000000000000)) AND ("D_YEAR" <= 2001.000000000000000000))) ))) AND (("D_YEAR" IS NOT NULL AND ("D_YEAR" >= 1999.000000000000000000)) AND ("D_YEAR" <= 2001.000000000000000000))) ) 
group by "brand_id", "class_id", "category_id" ) 
group by "brand_id", "class_id", "category_id" )  on ((("I_BRAND_ID" = "brand_id") AND ("I_CLASS_ID" = "class_id")) AND ("I_CATEGORY_ID" = "category_id"))
where (("I_BRAND_ID" IS NOT NULL AND "I_CLASS_ID" IS NOT NULL) AND "I_CATEGORY_ID" IS NOT NULL) )) AND ((("D_YEAR" IS NOT NULL AND "D_MOY" IS NOT NULL) AND ("D_YEAR" = 2001.000000000000000000)) AND ("D_MOY" = 11.000000000000000000)))
group by "I_BRAND_ID", "I_CLASS_ID", "I_CATEGORY_ID" ) 
where ("1_sparkora" IS NOT NULL AND (cast("1_sparkora" as NUMBER(38, 10)) >  ( select AVG(("quantity" * "list_price")) AS "average_sales"
from ( select "SS_QUANTITY" AS "quantity", "SS_LIST_PRICE" AS "list_price"
from TPCDS.STORE_SALES  join TPCDS.DATE_DIM  on ("SS_SOLD_DATE_SK" = "D_DATE_SK")
where ("SS_SOLD_DATE_SK" IS NOT NULL AND (("D_YEAR" IS NOT NULL AND ("D_YEAR" >= 1999.000000000000000000)) AND ("D_YEAR" <= 2001.000000000000000000))) UNION ALL select "CS_QUANTITY" AS "quantity", "CS_LIST_PRICE" AS "list_price"
from TPCDS.CATALOG_SALES  join TPCDS.DATE_DIM  on ("CS_SOLD_DATE_SK" = "D_DATE_SK")
where ("CS_SOLD_DATE_SK" IS NOT NULL AND (("D_YEAR" IS NOT NULL AND ("D_YEAR" >= 1999.000000000000000000)) AND ("D_YEAR" <= 2001.000000000000000000))) UNION ALL select "WS_QUANTITY" AS "quantity", "WS_LIST_PRICE" AS "list_price"
from TPCDS.WEB_SALES  join TPCDS.DATE_DIM  on ("WS_SOLD_DATE_SK" = "D_DATE_SK")
where ("WS_SOLD_DATE_SK" IS NOT NULL AND (("D_YEAR" IS NOT NULL AND ("D_YEAR" >= 1999.000000000000000000)) AND ("D_YEAR" <= 2001.000000000000000000))) )  ))) UNION ALL select "sales", "number_sales", 'catalog' AS "channel", "I_BRAND_ID", "I_CLASS_ID", "I_CATEGORY_ID"
from ( select "I_BRAND_ID", "I_CLASS_ID", "I_CATEGORY_ID", SUM(("CS_QUANTITY" * "CS_LIST_PRICE")) AS "sales", COUNT(1) AS "number_sales", SUM(("CS_QUANTITY" * "CS_LIST_PRICE")) AS "1_sparkora"
from TPCDS.CATALOG_SALES  join TPCDS.ITEM  on ("CS_ITEM_SK" = "I_ITEM_SK") join TPCDS.DATE_DIM  on ("CS_SOLD_DATE_SK" = "D_DATE_SK")
where ((("CS_SOLD_DATE_SK" IS NOT NULL AND  "CS_ITEM_SK" IN ( select "I_ITEM_SK"
from TPCDS.ITEM  join ( select "brand_id", "class_id", "category_id"
from ( select "brand_id", "class_id", "category_id"
from ( select "I_BRAND_ID" AS "brand_id", "I_CLASS_ID" AS "class_id", "I_CATEGORY_ID" AS "category_id"
from TPCDS.STORE_SALES  join TPCDS.ITEM  on ("SS_ITEM_SK" = "I_ITEM_SK") join TPCDS.DATE_DIM  on ("SS_SOLD_DATE_SK" = "D_DATE_SK")
where (("SS_SOLD_DATE_SK" IS NOT NULL AND (((("I_BRAND_ID" IS NOT NULL AND "I_CLASS_ID" IS NOT NULL) AND "I_CATEGORY_ID" IS NOT NULL) AND  (COALESCE("I_BRAND_ID" , 0E-18), CASE WHEN "I_BRAND_ID" IS NULL THEN 1 ELSE 0 END, COALESCE("I_CLASS_ID" , 0E-18), CASE WHEN "I_CLASS_ID" IS NULL THEN 1 ELSE 0 END, COALESCE("I_CATEGORY_ID" , 0E-18), CASE WHEN "I_CATEGORY_ID" IS NULL THEN 1 ELSE 0 END) IN ( select COALESCE("I_BRAND_ID" , 0E-18), CASE WHEN "I_BRAND_ID" IS NULL THEN 1 ELSE 0 END, COALESCE("I_CLASS_ID" , 0E-18), CASE WHEN "I_CLASS_ID" IS NULL THEN 1 ELSE 0 END, COALESCE("I_CATEGORY_ID" , 0E-18), CASE WHEN "I_CATEGORY_ID" IS NULL THEN 1 ELSE 0 END
from TPCDS.CATALOG_SALES  join TPCDS.ITEM  on ("CS_ITEM_SK" = "I_ITEM_SK") join TPCDS.DATE_DIM  on ("CS_SOLD_DATE_SK" = "D_DATE_SK")
where ("CS_SOLD_DATE_SK" IS NOT NULL AND (("D_YEAR" IS NOT NULL AND ("D_YEAR" >= 1999.000000000000000000)) AND ("D_YEAR" <= 2001.000000000000000000))) )) AND  (COALESCE("I_BRAND_ID" , 0E-18), CASE WHEN "I_BRAND_ID" IS NULL THEN 1 ELSE 0 END, COALESCE("I_CLASS_ID" , 0E-18), CASE WHEN "I_CLASS_ID" IS NULL THEN 1 ELSE 0 END, COALESCE("I_CATEGORY_ID" , 0E-18), CASE WHEN "I_CATEGORY_ID" IS NULL THEN 1 ELSE 0 END) IN ( select COALESCE("I_BRAND_ID" , 0E-18), CASE WHEN "I_BRAND_ID" IS NULL THEN 1 ELSE 0 END, COALESCE("I_CLASS_ID" , 0E-18), CASE WHEN "I_CLASS_ID" IS NULL THEN 1 ELSE 0 END, COALESCE("I_CATEGORY_ID" , 0E-18), CASE WHEN "I_CATEGORY_ID" IS NULL THEN 1 ELSE 0 END
from TPCDS.WEB_SALES  join TPCDS.ITEM  on ("WS_ITEM_SK" = "I_ITEM_SK") join TPCDS.DATE_DIM  on ("WS_SOLD_DATE_SK" = "D_DATE_SK")
where ("WS_SOLD_DATE_SK" IS NOT NULL AND (("D_YEAR" IS NOT NULL AND ("D_YEAR" >= 1999.000000000000000000)) AND ("D_YEAR" <= 2001.000000000000000000))) ))) AND (("D_YEAR" IS NOT NULL AND ("D_YEAR" >= 1999.000000000000000000)) AND ("D_YEAR" <= 2001.000000000000000000))) ) 
group by "brand_id", "class_id", "category_id" ) 
group by "brand_id", "class_id", "category_id" )  on ((("I_BRAND_ID" = "brand_id") AND ("I_CLASS_ID" = "class_id")) AND ("I_CATEGORY_ID" = "category_id"))
where (("I_BRAND_ID" IS NOT NULL AND "I_CLASS_ID" IS NOT NULL) AND "I_CATEGORY_ID" IS NOT NULL) )) AND  "I_ITEM_SK" IN ( select "I_ITEM_SK"
from TPCDS.ITEM  join ( select "brand_id", "class_id", "category_id"
from ( select "brand_id", "class_id", "category_id"
from ( select "I_BRAND_ID" AS "brand_id", "I_CLASS_ID" AS "class_id", "I_CATEGORY_ID" AS "category_id"
from TPCDS.STORE_SALES  join TPCDS.ITEM  on ("SS_ITEM_SK" = "I_ITEM_SK") join TPCDS.DATE_DIM  on ("SS_SOLD_DATE_SK" = "D_DATE_SK")
where (("SS_SOLD_DATE_SK" IS NOT NULL AND (((("I_BRAND_ID" IS NOT NULL AND "I_CLASS_ID" IS NOT NULL) AND "I_CATEGORY_ID" IS NOT NULL) AND  (COALESCE("I_BRAND_ID" , 0E-18), CASE WHEN "I_BRAND_ID" IS NULL THEN 1 ELSE 0 END, COALESCE("I_CLASS_ID" , 0E-18), CASE WHEN "I_CLASS_ID" IS NULL THEN 1 ELSE 0 END, COALESCE("I_CATEGORY_ID" , 0E-18), CASE WHEN "I_CATEGORY_ID" IS NULL THEN 1 ELSE 0 END) IN ( select COALESCE("I_BRAND_ID" , 0E-18), CASE WHEN "I_BRAND_ID" IS NULL THEN 1 ELSE 0 END, COALESCE("I_CLASS_ID" , 0E-18), CASE WHEN "I_CLASS_ID" IS NULL THEN 1 ELSE 0 END, COALESCE("I_CATEGORY_ID" , 0E-18), CASE WHEN "I_CATEGORY_ID" IS NULL THEN 1 ELSE 0 END
from TPCDS.CATALOG_SALES  join TPCDS.ITEM  on ("CS_ITEM_SK" = "I_ITEM_SK") join TPCDS.DATE_DIM  on ("CS_SOLD_DATE_SK" = "D_DATE_SK")
where ("CS_SOLD_DATE_SK" IS NOT NULL AND (("D_YEAR" IS NOT NULL AND ("D_YEAR" >= 1999.000000000000000000)) AND ("D_YEAR" <= 2001.000000000000000000))) )) AND  (COALESCE("I_BRAND_ID" , 0E-18), CASE WHEN "I_BRAND_ID" IS NULL THEN 1 ELSE 0 END, COALESCE("I_CLASS_ID" , 0E-18), CASE WHEN "I_CLASS_ID" IS NULL THEN 1 ELSE 0 END, COALESCE("I_CATEGORY_ID" , 0E-18), CASE WHEN "I_CATEGORY_ID" IS NULL THEN 1 ELSE 0 END) IN ( select COALESCE("I_BRAND_ID" , 0E-18), CASE WHEN "I_BRAND_ID" IS NULL THEN 1 ELSE 0 END, COALESCE("I_CLASS_ID" , 0E-18), CASE WHEN "I_CLASS_ID" IS NULL THEN 1 ELSE 0 END, COALESCE("I_CATEGORY_ID" , 0E-18), CASE WHEN "I_CATEGORY_ID" IS NULL THEN 1 ELSE 0 END
from TPCDS.WEB_SALES  join TPCDS.ITEM  on ("WS_ITEM_SK" = "I_ITEM_SK") join TPCDS.DATE_DIM  on ("WS_SOLD_DATE_SK" = "D_DATE_SK")
where ("WS_SOLD_DATE_SK" IS NOT NULL AND (("D_YEAR" IS NOT NULL AND ("D_YEAR" >= 1999.000000000000000000)) AND ("D_YEAR" <= 2001.000000000000000000))) ))) AND (("D_YEAR" IS NOT NULL AND ("D_YEAR" >= 1999.000000000000000000)) AND ("D_YEAR" <= 2001.000000000000000000))) ) 
group by "brand_id", "class_id", "category_id" ) 
group by "brand_id", "class_id", "category_id" )  on ((("I_BRAND_ID" = "brand_id") AND ("I_CLASS_ID" = "class_id")) AND ("I_CATEGORY_ID" = "category_id"))
where (("I_BRAND_ID" IS NOT NULL AND "I_CLASS_ID" IS NOT NULL) AND "I_CATEGORY_ID" IS NOT NULL) )) AND ((("D_YEAR" IS NOT NULL AND "D_MOY" IS NOT NULL) AND ("D_YEAR" = 2001.000000000000000000)) AND ("D_MOY" = 11.000000000000000000)))
group by "I_BRAND_ID", "I_CLASS_ID", "I_CATEGORY_ID" ) 
where ("1_sparkora" IS NOT NULL AND (cast("1_sparkora" as NUMBER(38, 10)) >  ( select AVG(("quantity" * "list_price")) AS "average_sales"
from ( select "SS_QUANTITY" AS "quantity", "SS_LIST_PRICE" AS "list_price"
from TPCDS.STORE_SALES  join TPCDS.DATE_DIM  on ("SS_SOLD_DATE_SK" = "D_DATE_SK")
where ("SS_SOLD_DATE_SK" IS NOT NULL AND (("D_YEAR" IS NOT NULL AND ("D_YEAR" >= 1999.000000000000000000)) AND ("D_YEAR" <= 2001.000000000000000000))) UNION ALL select "CS_QUANTITY" AS "quantity", "CS_LIST_PRICE" AS "list_price"
from TPCDS.CATALOG_SALES  join TPCDS.DATE_DIM  on ("CS_SOLD_DATE_SK" = "D_DATE_SK")
where ("CS_SOLD_DATE_SK" IS NOT NULL AND (("D_YEAR" IS NOT NULL AND ("D_YEAR" >= 1999.000000000000000000)) AND ("D_YEAR" <= 2001.000000000000000000))) UNION ALL select "WS_QUANTITY" AS "quantity", "WS_LIST_PRICE" AS "list_price"
from TPCDS.WEB_SALES  join TPCDS.DATE_DIM  on ("WS_SOLD_DATE_SK" = "D_DATE_SK")
where ("WS_SOLD_DATE_SK" IS NOT NULL AND (("D_YEAR" IS NOT NULL AND ("D_YEAR" >= 1999.000000000000000000)) AND ("D_YEAR" <= 2001.000000000000000000))) )  ))) UNION ALL select "sales", "number_sales", 'web' AS "channel", "I_BRAND_ID", "I_CLASS_ID", "I_CATEGORY_ID"
from ( select "I_BRAND_ID", "I_CLASS_ID", "I_CATEGORY_ID", SUM(("WS_QUANTITY" * "WS_LIST_PRICE")) AS "sales", COUNT(1) AS "number_sales", SUM(("WS_QUANTITY" * "WS_LIST_PRICE")) AS "1_sparkora"
from TPCDS.WEB_SALES  join TPCDS.ITEM  on ("WS_ITEM_SK" = "I_ITEM_SK") join TPCDS.DATE_DIM  on ("WS_SOLD_DATE_SK" = "D_DATE_SK")
where ((("WS_SOLD_DATE_SK" IS NOT NULL AND  "WS_ITEM_SK" IN ( select "I_ITEM_SK"
from TPCDS.ITEM  join ( select "brand_id", "class_id", "category_id"
from ( select "brand_id", "class_id", "category_id"
from ( select "I_BRAND_ID" AS "brand_id", "I_CLASS_ID" AS "class_id", "I_CATEGORY_ID" AS "category_id"
from TPCDS.STORE_SALES  join TPCDS.ITEM  on ("SS_ITEM_SK" = "I_ITEM_SK") join TPCDS.DATE_DIM  on ("SS_SOLD_DATE_SK" = "D_DATE_SK")
where (("SS_SOLD_DATE_SK" IS NOT NULL AND (((("I_BRAND_ID" IS NOT NULL AND "I_CLASS_ID" IS NOT NULL) AND "I_CATEGORY_ID" IS NOT NULL) AND  (COALESCE("I_BRAND_ID" , 0E-18), CASE WHEN "I_BRAND_ID" IS NULL THEN 1 ELSE 0 END, COALESCE("I_CLASS_ID" , 0E-18), CASE WHEN "I_CLASS_ID" IS NULL THEN 1 ELSE 0 END, COALESCE("I_CATEGORY_ID" , 0E-18), CASE WHEN "I_CATEGORY_ID" IS NULL THEN 1 ELSE 0 END) IN ( select COALESCE("I_BRAND_ID" , 0E-18), CASE WHEN "I_BRAND_ID" IS NULL THEN 1 ELSE 0 END, COALESCE("I_CLASS_ID" , 0E-18), CASE WHEN "I_CLASS_ID" IS NULL THEN 1 ELSE 0 END, COALESCE("I_CATEGORY_ID" , 0E-18), CASE WHEN "I_CATEGORY_ID" IS NULL THEN 1 ELSE 0 END
from TPCDS.CATALOG_SALES  join TPCDS.ITEM  on ("CS_ITEM_SK" = "I_ITEM_SK") join TPCDS.DATE_DIM  on ("CS_SOLD_DATE_SK" = "D_DATE_SK")
where ("CS_SOLD_DATE_SK" IS NOT NULL AND (("D_YEAR" IS NOT NULL AND ("D_YEAR" >= 1999.000000000000000000)) AND ("D_YEAR" <= 2001.000000000000000000))) )) AND  (COALESCE("I_BRAND_ID" , 0E-18), CASE WHEN "I_BRAND_ID" IS NULL THEN 1 ELSE 0 END, COALESCE("I_CLASS_ID" , 0E-18), CASE WHEN "I_CLASS_ID" IS NULL THEN 1 ELSE 0 END, COALESCE("I_CATEGORY_ID" , 0E-18), CASE WHEN "I_CATEGORY_ID" IS NULL THEN 1 ELSE 0 END) IN ( select COALESCE("I_BRAND_ID" , 0E-18), CASE WHEN "I_BRAND_ID" IS NULL THEN 1 ELSE 0 END, COALESCE("I_CLASS_ID" , 0E-18), CASE WHEN "I_CLASS_ID" IS NULL THEN 1 ELSE 0 END, COALESCE("I_CATEGORY_ID" , 0E-18), CASE WHEN "I_CATEGORY_ID" IS NULL THEN 1 ELSE 0 END
from TPCDS.WEB_SALES  join TPCDS.ITEM  on ("WS_ITEM_SK" = "I_ITEM_SK") join TPCDS.DATE_DIM  on ("WS_SOLD_DATE_SK" = "D_DATE_SK")
where ("WS_SOLD_DATE_SK" IS NOT NULL AND (("D_YEAR" IS NOT NULL AND ("D_YEAR" >= 1999.000000000000000000)) AND ("D_YEAR" <= 2001.000000000000000000))) ))) AND (("D_YEAR" IS NOT NULL AND ("D_YEAR" >= 1999.000000000000000000)) AND ("D_YEAR" <= 2001.000000000000000000))) ) 
group by "brand_id", "class_id", "category_id" ) 
group by "brand_id", "class_id", "category_id" )  on ((("I_BRAND_ID" = "brand_id") AND ("I_CLASS_ID" = "class_id")) AND ("I_CATEGORY_ID" = "category_id"))
where (("I_BRAND_ID" IS NOT NULL AND "I_CLASS_ID" IS NOT NULL) AND "I_CATEGORY_ID" IS NOT NULL) )) AND  "I_ITEM_SK" IN ( select "I_ITEM_SK"
from TPCDS.ITEM  join ( select "brand_id", "class_id", "category_id"
from ( select "brand_id", "class_id", "category_id"
from ( select "I_BRAND_ID" AS "brand_id", "I_CLASS_ID" AS "class_id", "I_CATEGORY_ID" AS "category_id"
from TPCDS.STORE_SALES  join TPCDS.ITEM  on ("SS_ITEM_SK" = "I_ITEM_SK") join TPCDS.DATE_DIM  on ("SS_SOLD_DATE_SK" = "D_DATE_SK")
where (("SS_SOLD_DATE_SK" IS NOT NULL AND (((("I_BRAND_ID" IS NOT NULL AND "I_CLASS_ID" IS NOT NULL) AND "I_CATEGORY_ID" IS NOT NULL) AND  (COALESCE("I_BRAND_ID" , 0E-18), CASE WHEN "I_BRAND_ID" IS NULL THEN 1 ELSE 0 END, COALESCE("I_CLASS_ID" , 0E-18), CASE WHEN "I_CLASS_ID" IS NULL THEN 1 ELSE 0 END, COALESCE("I_CATEGORY_ID" , 0E-18), CASE WHEN "I_CATEGORY_ID" IS NULL THEN 1 ELSE 0 END) IN ( select COALESCE("I_BRAND_ID" , 0E-18), CASE WHEN "I_BRAND_ID" IS NULL THEN 1 ELSE 0 END, COALESCE("I_CLASS_ID" , 0E-18), CASE WHEN "I_CLASS_ID" IS NULL THEN 1 ELSE 0 END, COALESCE("I_CATEGORY_ID" , 0E-18), CASE WHEN "I_CATEGORY_ID" IS NULL THEN 1 ELSE 0 END
from TPCDS.CATALOG_SALES  join TPCDS.ITEM  on ("CS_ITEM_SK" = "I_ITEM_SK") join TPCDS.DATE_DIM  on ("CS_SOLD_DATE_SK" = "D_DATE_SK")
where ("CS_SOLD_DATE_SK" IS NOT NULL AND (("D_YEAR" IS NOT NULL AND ("D_YEAR" >= 1999.000000000000000000)) AND ("D_YEAR" <= 2001.000000000000000000))) )) AND  (COALESCE("I_BRAND_ID" , 0E-18), CASE WHEN "I_BRAND_ID" IS NULL THEN 1 ELSE 0 END, COALESCE("I_CLASS_ID" , 0E-18), CASE WHEN "I_CLASS_ID" IS NULL THEN 1 ELSE 0 END, COALESCE("I_CATEGORY_ID" , 0E-18), CASE WHEN "I_CATEGORY_ID" IS NULL THEN 1 ELSE 0 END) IN ( select COALESCE("I_BRAND_ID" , 0E-18), CASE WHEN "I_BRAND_ID" IS NULL THEN 1 ELSE 0 END, COALESCE("I_CLASS_ID" , 0E-18), CASE WHEN "I_CLASS_ID" IS NULL THEN 1 ELSE 0 END, COALESCE("I_CATEGORY_ID" , 0E-18), CASE WHEN "I_CATEGORY_ID" IS NULL THEN 1 ELSE 0 END
from TPCDS.WEB_SALES  join TPCDS.ITEM  on ("WS_ITEM_SK" = "I_ITEM_SK") join TPCDS.DATE_DIM  on ("WS_SOLD_DATE_SK" = "D_DATE_SK")
where ("WS_SOLD_DATE_SK" IS NOT NULL AND (("D_YEAR" IS NOT NULL AND ("D_YEAR" >= 1999.000000000000000000)) AND ("D_YEAR" <= 2001.000000000000000000))) ))) AND (("D_YEAR" IS NOT NULL AND ("D_YEAR" >= 1999.000000000000000000)) AND ("D_YEAR" <= 2001.000000000000000000))) ) 
group by "brand_id", "class_id", "category_id" ) 
group by "brand_id", "class_id", "category_id" )  on ((("I_BRAND_ID" = "brand_id") AND ("I_CLASS_ID" = "class_id")) AND ("I_CATEGORY_ID" = "category_id"))
where (("I_BRAND_ID" IS NOT NULL AND "I_CLASS_ID" IS NOT NULL) AND "I_CATEGORY_ID" IS NOT NULL) )) AND ((("D_YEAR" IS NOT NULL AND "D_MOY" IS NOT NULL) AND ("D_YEAR" = 2001.000000000000000000)) AND ("D_MOY" = 11.000000000000000000)))
group by "I_BRAND_ID", "I_CLASS_ID", "I_CATEGORY_ID" ) 
where ("1_sparkora" IS NOT NULL AND (cast("1_sparkora" as NUMBER(38, 10)) >  ( select AVG(("quantity" * "list_price")) AS "average_sales"
from ( select "SS_QUANTITY" AS "quantity", "SS_LIST_PRICE" AS "list_price"
from TPCDS.STORE_SALES  join TPCDS.DATE_DIM  on ("SS_SOLD_DATE_SK" = "D_DATE_SK")
where ("SS_SOLD_DATE_SK" IS NOT NULL AND (("D_YEAR" IS NOT NULL AND ("D_YEAR" >= 1999.000000000000000000)) AND ("D_YEAR" <= 2001.000000000000000000))) UNION ALL select "CS_QUANTITY" AS "quantity", "CS_LIST_PRICE" AS "list_price"
from TPCDS.CATALOG_SALES  join TPCDS.DATE_DIM  on ("CS_SOLD_DATE_SK" = "D_DATE_SK")
where ("CS_SOLD_DATE_SK" IS NOT NULL AND (("D_YEAR" IS NOT NULL AND ("D_YEAR" >= 1999.000000000000000000)) AND ("D_YEAR" <= 2001.000000000000000000))) UNION ALL select "WS_QUANTITY" AS "quantity", "WS_LIST_PRICE" AS "list_price"
from TPCDS.WEB_SALES  join TPCDS.DATE_DIM  on ("WS_SOLD_DATE_SK" = "D_DATE_SK")
where ("WS_SOLD_DATE_SK" IS NOT NULL AND (("D_YEAR" IS NOT NULL AND ("D_YEAR" >= 1999.000000000000000000)) AND ("D_YEAR" <= 2001.000000000000000000))) )  ))) )   , lateral ( select "channel" "channel_7_sparkora", "I_BRAND_ID" "i_brand_id_8_sparkora", "I_CLASS_ID" "i_class_id_10_sparkora", "I_CATEGORY_ID" "i_category_id_11_sparkora", 0 "spark_grouping_id_12_sparkora" from dual union all select "channel", "I_BRAND_ID", "I_CLASS_ID", null, 1 from dual union all select "channel", "I_BRAND_ID", null, null, 3 from dual union all select "channel", null, null, null, 7 from dual union all select null, null, null, null, 15 from dual )
group by "channel_7_sparkora", "i_brand_id_8_sparkora", "i_class_id_10_sparkora", "i_category_id_11_sparkora", "spark_grouping_id_12_sparkora"
order by "channel_7_sparkora" ASC NULLS FIRST, "i_brand_id_8_sparkora" ASC NULLS FIRST, "i_class_id_10_sparkora" ASC NULLS FIRST, "i_category_id_11_sparkora" ASC NULLS FIRST ) 
where rownum <= 100
Pushdown Oracle SQL, oracle plan stats estimates:
rowCount = 15, bytes=1050
Pushdown Oracle SQL, Query Splitting details:
Query is not split

Spark Plan with Pushdown turned off

== Physical Plan ==
TakeOrderedAndProject (327)
+- * HashAggregate (326)
   +- Exchange (325)
      +- * HashAggregate (324)
         +- * Expand (323)
            +- Union (322)
               :- * Project (107)
               :  +- * Filter (106)
               :     +- * HashAggregate (105)
               :        +- Exchange (104)
               :           +- * HashAggregate (103)
               :              +- * Project (102)
               :                 +- * SortMergeJoin Inner (101)
               :                    :- * Sort (95)
               :                    :  +- Exchange (94)
               :                    :     +- * Project (93)
               :                    :        +- * SortMergeJoin Inner (92)
               :                    :           :- SortMergeJoin LeftSemi (84)
               :                    :           :  :- * Sort (4)
               :                    :           :  :  +- Exchange (3)
               :                    :           :  :     +- * Project (2)
               :                    :           :  :        +- BatchScan (1)
               :                    :           :  +- * Sort (83)
               :                    :           :     +- Exchange (82)
               :                    :           :        +- * Project (81)
               :                    :           :           +- * SortMergeJoin Inner (80)
               :                    :           :              :- * Sort (8)
               :                    :           :              :  +- Exchange (7)
               :                    :           :              :     +- * Filter (6)
               :                    :           :              :        +- BatchScan (5)
               :                    :           :              +- * Sort (79)
               :                    :           :                 +- * HashAggregate (78)
               :                    :           :                    +- * HashAggregate (77)
               :                    :           :                       +- * HashAggregate (76)
               :                    :           :                          +- Exchange (75)
               :                    :           :                             +- * HashAggregate (74)
               :                    :           :                                +- * Project (73)
               :                    :           :                                   +- * SortMergeJoin Inner (72)
               :                    :           :                                      :- * Sort (66)
               :                    :           :                                      :  +- Exchange (65)
               :                    :           :                                      :     +- * Project (64)
               :                    :           :                                      :        +- * SortMergeJoin Inner (63)
               :                    :           :                                      :           :- * Sort (12)
               :                    :           :                                      :           :  +- Exchange (11)
               :                    :           :                                      :           :     +- * Project (10)
               :                    :           :                                      :           :        +- BatchScan (9)
               :                    :           :                                      :           +- * Sort (62)
               :                    :           :                                      :              +- Exchange (61)
               :                    :           :                                      :                 +- SortMergeJoin LeftSemi (60)
               :                    :           :                                      :                    :- SortMergeJoin LeftSemi (38)
               :                    :           :                                      :                    :  :- * Sort (16)
               :                    :           :                                      :                    :  :  +- Exchange (15)
               :                    :           :                                      :                    :  :     +- * Filter (14)
               :                    :           :                                      :                    :  :        +- BatchScan (13)
               :                    :           :                                      :                    :  +- * Sort (37)
               :                    :           :                                      :                    :     +- Exchange (36)
               :                    :           :                                      :                    :        +- * Project (35)
               :                    :           :                                      :                    :           +- * SortMergeJoin Inner (34)
               :                    :           :                                      :                    :              :- * Sort (28)
               :                    :           :                                      :                    :              :  +- Exchange (27)
               :                    :           :                                      :                    :              :     +- * Project (26)
               :                    :           :                                      :                    :              :        +- * SortMergeJoin Inner (25)
               :                    :           :                                      :                    :              :           :- * Sort (20)
               :                    :           :                                      :                    :              :           :  +- Exchange (19)
               :                    :           :                                      :                    :              :           :     +- * Project (18)
               :                    :           :                                      :                    :              :           :        +- BatchScan (17)
               :                    :           :                                      :                    :              :           +- * Sort (24)
               :                    :           :                                      :                    :              :              +- Exchange (23)
               :                    :           :                                      :                    :              :                 +- * Project (22)
               :                    :           :                                      :                    :              :                    +- BatchScan (21)
               :                    :           :                                      :                    :              +- * Sort (33)
               :                    :           :                                      :                    :                 +- Exchange (32)
               :                    :           :                                      :                    :                    +- * Project (31)
               :                    :           :                                      :                    :                       +- * Filter (30)
               :                    :           :                                      :                    :                          +- BatchScan (29)
               :                    :           :                                      :                    +- * Sort (59)
               :                    :           :                                      :                       +- Exchange (58)
               :                    :           :                                      :                          +- * Project (57)
               :                    :           :                                      :                             +- * SortMergeJoin Inner (56)
               :                    :           :                                      :                                :- * Sort (50)
               :                    :           :                                      :                                :  +- Exchange (49)
               :                    :           :                                      :                                :     +- * Project (48)
               :                    :           :                                      :                                :        +- * SortMergeJoin Inner (47)
               :                    :           :                                      :                                :           :- * Sort (42)
               :                    :           :                                      :                                :           :  +- Exchange (41)
               :                    :           :                                      :                                :           :     +- * Project (40)
               :                    :           :                                      :                                :           :        +- BatchScan (39)
               :                    :           :                                      :                                :           +- * Sort (46)
               :                    :           :                                      :                                :              +- Exchange (45)
               :                    :           :                                      :                                :                 +- * Project (44)
               :                    :           :                                      :                                :                    +- BatchScan (43)
               :                    :           :                                      :                                +- * Sort (55)
               :                    :           :                                      :                                   +- Exchange (54)
               :                    :           :                                      :                                      +- * Project (53)
               :                    :           :                                      :                                         +- * Filter (52)
               :                    :           :                                      :                                            +- BatchScan (51)
               :                    :           :                                      +- * Sort (71)
               :                    :           :                                         +- Exchange (70)
               :                    :           :                                            +- * Project (69)
               :                    :           :                                               +- * Filter (68)
               :                    :           :                                                  +- BatchScan (67)
               :                    :           +- SortMergeJoin LeftSemi (91)
               :                    :              :- * Sort (88)
               :                    :              :  +- Exchange (87)
               :                    :              :     +- * Project (86)
               :                    :              :        +- BatchScan (85)
               :                    :              +- * Sort (90)
               :                    :                 +- ReusedExchange (89)
               :                    +- * Sort (100)
               :                       +- Exchange (99)
               :                          +- * Project (98)
               :                             +- * Filter (97)
               :                                +- BatchScan (96)
               :- * Project (214)
               :  +- * Filter (213)
               :     +- * HashAggregate (212)
               :        +- Exchange (211)
               :           +- * HashAggregate (210)
               :              +- * Project (209)
               :                 +- * SortMergeJoin Inner (208)
               :                    :- * Sort (202)
               :                    :  +- Exchange (201)
               :                    :     +- * Project (200)
               :                    :        +- * SortMergeJoin Inner (199)
               :                    :           :- SortMergeJoin LeftSemi (191)
               :                    :           :  :- * Sort (111)
               :                    :           :  :  +- Exchange (110)
               :                    :           :  :     +- * Project (109)
               :                    :           :  :        +- BatchScan (108)
               :                    :           :  +- * Sort (190)
               :                    :           :     +- Exchange (189)
               :                    :           :        +- * Project (188)
               :                    :           :           +- * SortMergeJoin Inner (187)
               :                    :           :              :- * Sort (115)
               :                    :           :              :  +- Exchange (114)
               :                    :           :              :     +- * Filter (113)
               :                    :           :              :        +- BatchScan (112)
               :                    :           :              +- * Sort (186)
               :                    :           :                 +- * HashAggregate (185)
               :                    :           :                    +- * HashAggregate (184)
               :                    :           :                       +- * HashAggregate (183)
               :                    :           :                          +- Exchange (182)
               :                    :           :                             +- * HashAggregate (181)
               :                    :           :                                +- * Project (180)
               :                    :           :                                   +- * SortMergeJoin Inner (179)
               :                    :           :                                      :- * Sort (173)
               :                    :           :                                      :  +- Exchange (172)
               :                    :           :                                      :     +- * Project (171)
               :                    :           :                                      :        +- * SortMergeJoin Inner (170)
               :                    :           :                                      :           :- * Sort (119)
               :                    :           :                                      :           :  +- Exchange (118)
               :                    :           :                                      :           :     +- * Project (117)
               :                    :           :                                      :           :        +- BatchScan (116)
               :                    :           :                                      :           +- * Sort (169)
               :                    :           :                                      :              +- Exchange (168)
               :                    :           :                                      :                 +- SortMergeJoin LeftSemi (167)
               :                    :           :                                      :                    :- SortMergeJoin LeftSemi (145)
               :                    :           :                                      :                    :  :- * Sort (123)
               :                    :           :                                      :                    :  :  +- Exchange (122)
               :                    :           :                                      :                    :  :     +- * Filter (121)
               :                    :           :                                      :                    :  :        +- BatchScan (120)
               :                    :           :                                      :                    :  +- * Sort (144)
               :                    :           :                                      :                    :     +- Exchange (143)
               :                    :           :                                      :                    :        +- * Project (142)
               :                    :           :                                      :                    :           +- * SortMergeJoin Inner (141)
               :                    :           :                                      :                    :              :- * Sort (135)
               :                    :           :                                      :                    :              :  +- Exchange (134)
               :                    :           :                                      :                    :              :     +- * Project (133)
               :                    :           :                                      :                    :              :        +- * SortMergeJoin Inner (132)
               :                    :           :                                      :                    :              :           :- * Sort (127)
               :                    :           :                                      :                    :              :           :  +- Exchange (126)
               :                    :           :                                      :                    :              :           :     +- * Project (125)
               :                    :           :                                      :                    :              :           :        +- BatchScan (124)
               :                    :           :                                      :                    :              :           +- * Sort (131)
               :                    :           :                                      :                    :              :              +- Exchange (130)
               :                    :           :                                      :                    :              :                 +- * Project (129)
               :                    :           :                                      :                    :              :                    +- BatchScan (128)
               :                    :           :                                      :                    :              +- * Sort (140)
               :                    :           :                                      :                    :                 +- Exchange (139)
               :                    :           :                                      :                    :                    +- * Project (138)
               :                    :           :                                      :                    :                       +- * Filter (137)
               :                    :           :                                      :                    :                          +- BatchScan (136)
               :                    :           :                                      :                    +- * Sort (166)
               :                    :           :                                      :                       +- Exchange (165)
               :                    :           :                                      :                          +- * Project (164)
               :                    :           :                                      :                             +- * SortMergeJoin Inner (163)
               :                    :           :                                      :                                :- * Sort (157)
               :                    :           :                                      :                                :  +- Exchange (156)
               :                    :           :                                      :                                :     +- * Project (155)
               :                    :           :                                      :                                :        +- * SortMergeJoin Inner (154)
               :                    :           :                                      :                                :           :- * Sort (149)
               :                    :           :                                      :                                :           :  +- Exchange (148)
               :                    :           :                                      :                                :           :     +- * Project (147)
               :                    :           :                                      :                                :           :        +- BatchScan (146)
               :                    :           :                                      :                                :           +- * Sort (153)
               :                    :           :                                      :                                :              +- Exchange (152)
               :                    :           :                                      :                                :                 +- * Project (151)
               :                    :           :                                      :                                :                    +- BatchScan (150)
               :                    :           :                                      :                                +- * Sort (162)
               :                    :           :                                      :                                   +- Exchange (161)
               :                    :           :                                      :                                      +- * Project (160)
               :                    :           :                                      :                                         +- * Filter (159)
               :                    :           :                                      :                                            +- BatchScan (158)
               :                    :           :                                      +- * Sort (178)
               :                    :           :                                         +- Exchange (177)
               :                    :           :                                            +- * Project (176)
               :                    :           :                                               +- * Filter (175)
               :                    :           :                                                  +- BatchScan (174)
               :                    :           +- SortMergeJoin LeftSemi (198)
               :                    :              :- * Sort (195)
               :                    :              :  +- Exchange (194)
               :                    :              :     +- * Project (193)
               :                    :              :        +- BatchScan (192)
               :                    :              +- * Sort (197)
               :                    :                 +- ReusedExchange (196)
               :                    +- * Sort (207)
               :                       +- Exchange (206)
               :                          +- * Project (205)
               :                             +- * Filter (204)
               :                                +- BatchScan (203)
               +- * Project (321)
                  +- * Filter (320)
                     +- * HashAggregate (319)
                        +- Exchange (318)
                           +- * HashAggregate (317)
                              +- * Project (316)
                                 +- * SortMergeJoin Inner (315)
                                    :- * Sort (309)
                                    :  +- Exchange (308)
                                    :     +- * Project (307)
                                    :        +- * SortMergeJoin Inner (306)
                                    :           :- SortMergeJoin LeftSemi (298)
                                    :           :  :- * Sort (218)
                                    :           :  :  +- Exchange (217)
                                    :           :  :     +- * Project (216)
                                    :           :  :        +- BatchScan (215)
                                    :           :  +- * Sort (297)
                                    :           :     +- Exchange (296)
                                    :           :        +- * Project (295)
                                    :           :           +- * SortMergeJoin Inner (294)
                                    :           :              :- * Sort (222)
                                    :           :              :  +- Exchange (221)
                                    :           :              :     +- * Filter (220)
                                    :           :              :        +- BatchScan (219)
                                    :           :              +- * Sort (293)
                                    :           :                 +- * HashAggregate (292)
                                    :           :                    +- * HashAggregate (291)
                                    :           :                       +- * HashAggregate (290)
                                    :           :                          +- Exchange (289)
                                    :           :                             +- * HashAggregate (288)
                                    :           :                                +- * Project (287)
                                    :           :                                   +- * SortMergeJoin Inner (286)
                                    :           :                                      :- * Sort (280)
                                    :           :                                      :  +- Exchange (279)
                                    :           :                                      :     +- * Project (278)
                                    :           :                                      :        +- * SortMergeJoin Inner (277)
                                    :           :                                      :           :- * Sort (226)
                                    :           :                                      :           :  +- Exchange (225)
                                    :           :                                      :           :     +- * Project (224)
                                    :           :                                      :           :        +- BatchScan (223)
                                    :           :                                      :           +- * Sort (276)
                                    :           :                                      :              +- Exchange (275)
                                    :           :                                      :                 +- SortMergeJoin LeftSemi (274)
                                    :           :                                      :                    :- SortMergeJoin LeftSemi (252)
                                    :           :                                      :                    :  :- * Sort (230)
                                    :           :                                      :                    :  :  +- Exchange (229)
                                    :           :                                      :                    :  :     +- * Filter (228)
                                    :           :                                      :                    :  :        +- BatchScan (227)
                                    :           :                                      :                    :  +- * Sort (251)
                                    :           :                                      :                    :     +- Exchange (250)
                                    :           :                                      :                    :        +- * Project (249)
                                    :           :                                      :                    :           +- * SortMergeJoin Inner (248)
                                    :           :                                      :                    :              :- * Sort (242)
                                    :           :                                      :                    :              :  +- Exchange (241)
                                    :           :                                      :                    :              :     +- * Project (240)
                                    :           :                                      :                    :              :        +- * SortMergeJoin Inner (239)
                                    :           :                                      :                    :              :           :- * Sort (234)
                                    :           :                                      :                    :              :           :  +- Exchange (233)
                                    :           :                                      :                    :              :           :     +- * Project (232)
                                    :           :                                      :                    :              :           :        +- BatchScan (231)
                                    :           :                                      :                    :              :           +- * Sort (238)
                                    :           :                                      :                    :              :              +- Exchange (237)
                                    :           :                                      :                    :              :                 +- * Project (236)
                                    :           :                                      :                    :              :                    +- BatchScan (235)
                                    :           :                                      :                    :              +- * Sort (247)
                                    :           :                                      :                    :                 +- Exchange (246)
                                    :           :                                      :                    :                    +- * Project (245)
                                    :           :                                      :                    :                       +- * Filter (244)
                                    :           :                                      :                    :                          +- BatchScan (243)
                                    :           :                                      :                    +- * Sort (273)
                                    :           :                                      :                       +- Exchange (272)
                                    :           :                                      :                          +- * Project (271)
                                    :           :                                      :                             +- * SortMergeJoin Inner (270)
                                    :           :                                      :                                :- * Sort (264)
                                    :           :                                      :                                :  +- Exchange (263)
                                    :           :                                      :                                :     +- * Project (262)
                                    :           :                                      :                                :        +- * SortMergeJoin Inner (261)
                                    :           :                                      :                                :           :- * Sort (256)
                                    :           :                                      :                                :           :  +- Exchange (255)
                                    :           :                                      :                                :           :     +- * Project (254)
                                    :           :                                      :                                :           :        +- BatchScan (253)
                                    :           :                                      :                                :           +- * Sort (260)
                                    :           :                                      :                                :              +- Exchange (259)
                                    :           :                                      :                                :                 +- * Project (258)
                                    :           :                                      :                                :                    +- BatchScan (257)
                                    :           :                                      :                                +- * Sort (269)
                                    :           :                                      :                                   +- Exchange (268)
                                    :           :                                      :                                      +- * Project (267)
                                    :           :                                      :                                         +- * Filter (266)
                                    :           :                                      :                                            +- BatchScan (265)
                                    :           :                                      +- * Sort (285)
                                    :           :                                         +- Exchange (284)
                                    :           :                                            +- * Project (283)
                                    :           :                                               +- * Filter (282)
                                    :           :                                                  +- BatchScan (281)
                                    :           +- SortMergeJoin LeftSemi (305)
                                    :              :- * Sort (302)
                                    :              :  +- Exchange (301)
                                    :              :     +- * Project (300)
                                    :              :        +- BatchScan (299)
                                    :              +- * Sort (304)
                                    :                 +- ReusedExchange (303)
                                    +- * Sort (314)
                                       +- Exchange (313)
                                          +- * Project (312)
                                             +- * Filter (311)
                                                +- BatchScan (310)


(1) BatchScan
Output [4]: [SS_ITEM_SK#11975, SS_QUANTITY#11983, SS_LIST_PRICE#11985, SS_SOLD_DATE_SK#11973]
Format: orafile
OraPlan: 00 OraTableScan TPCDS.STORE_SALES, [SS_ITEM_SK#13853, SS_QUANTITY#13854, SS_LIST_PRICE#13855, SS_SOLD_DATE_SK#13856], [oracolumnref(SS_ITEM_SK#13853), oracolumnref(SS_QUANTITY#13854), oracolumnref(SS_LIST_PRICE#13855), oracolumnref(SS_SOLD_DATE_SK#13856)]
PartitionSchema: struct<SS_SOLD_DATE_SK:decimal(38,18)>
ReadSchema: struct<SS_ITEM_SK:decimal(38,18),SS_QUANTITY:decimal(38,18),SS_LIST_PRICE:decimal(38,18)>
dsKey: DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
oraPushdownSQL: select "SS_ITEM_SK", "SS_QUANTITY", "SS_LIST_PRICE", "SS_SOLD_DATE_SK"
from TPCDS.STORE_SALES
where "SS_SOLD_DATE_SK" IS NOT NULL

(2) Project [codegen id : 1]
Output [4]: [SS_ITEM_SK#11975, SS_QUANTITY#11983, SS_LIST_PRICE#11985, SS_SOLD_DATE_SK#11973]
Input [4]: [SS_ITEM_SK#11975, SS_QUANTITY#11983, SS_LIST_PRICE#11985, SS_SOLD_DATE_SK#11973]

(3) Exchange
Input [4]: [SS_ITEM_SK#11975, SS_QUANTITY#11983, SS_LIST_PRICE#11985, SS_SOLD_DATE_SK#11973]
Arguments: hashpartitioning(SS_ITEM_SK#11975, 5), ENSURE_REQUIREMENTS, [id=#7486]

(4) Sort [codegen id : 2]
Input [4]: [SS_ITEM_SK#11975, SS_QUANTITY#11983, SS_LIST_PRICE#11985, SS_SOLD_DATE_SK#11973]
Arguments: [SS_ITEM_SK#11975 ASC NULLS FIRST], false, 0

(5) BatchScan
Output [4]: [I_ITEM_SK#12217, I_BRAND_ID#12224, I_CLASS_ID#12226, I_CATEGORY_ID#12228]
Format: orafile
OraPlan: 00 OraTableScan TPCDS.ITEM, [I_ITEM_SK#13617, I_BRAND_ID#13618, I_CLASS_ID#13619, I_CATEGORY_ID#13620], [oracolumnref(I_ITEM_SK#13617), oracolumnref(I_BRAND_ID#13618), oracolumnref(I_CLASS_ID#13619), oracolumnref(I_CATEGORY_ID#13620)], orabinaryopexpression(((isnotnull(I_BRAND_ID#12224) AND isnotnull(I_CLASS_ID#12226)) AND isnotnull(I_CATEGORY_ID#12228)))
PartitionSchema: struct<>
ReadSchema: struct<I_ITEM_SK:decimal(38,18),I_BRAND_ID:decimal(38,18),I_CLASS_ID:decimal(38,18),I_CATEGORY_ID:decimal(38,18)>
dsKey: DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
oraPushdownSQL: select "I_ITEM_SK", "I_BRAND_ID", "I_CLASS_ID", "I_CATEGORY_ID"
from TPCDS.ITEM
where (("I_BRAND_ID" IS NOT NULL AND "I_CLASS_ID" IS NOT NULL) AND "I_CATEGORY_ID" IS NOT NULL)

(6) Filter [codegen id : 3]
Input [4]: [I_ITEM_SK#12217, I_BRAND_ID#12224, I_CLASS_ID#12226, I_CATEGORY_ID#12228]
Condition : ((isnotnull(I_BRAND_ID#12224) AND isnotnull(I_CLASS_ID#12226)) AND isnotnull(I_CATEGORY_ID#12228))

(7) Exchange
Input [4]: [I_ITEM_SK#12217, I_BRAND_ID#12224, I_CLASS_ID#12226, I_CATEGORY_ID#12228]
Arguments: hashpartitioning(i_brand_id#12224, i_class_id#12226, i_category_id#12228, 5), ENSURE_REQUIREMENTS, [id=#7493]

(8) Sort [codegen id : 4]
Input [4]: [I_ITEM_SK#12217, I_BRAND_ID#12224, I_CLASS_ID#12226, I_CATEGORY_ID#12228]
Arguments: [i_brand_id#12224 ASC NULLS FIRST, i_class_id#12226 ASC NULLS FIRST, i_category_id#12228 ASC NULLS FIRST], false, 0

(9) BatchScan
Output [2]: [SS_ITEM_SK#12241, SS_SOLD_DATE_SK#12239]
Format: orafile
OraPlan: 00 OraTableScan TPCDS.STORE_SALES, [SS_ITEM_SK#13625, SS_SOLD_DATE_SK#13626], [oracolumnref(SS_ITEM_SK#13625), oracolumnref(SS_SOLD_DATE_SK#13626)]
PartitionSchema: struct<SS_SOLD_DATE_SK:decimal(38,18)>
ReadSchema: struct<SS_ITEM_SK:decimal(38,18)>
dsKey: DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
oraPushdownSQL: select "SS_ITEM_SK", "SS_SOLD_DATE_SK"
from TPCDS.STORE_SALES
where "SS_SOLD_DATE_SK" IS NOT NULL

(10) Project [codegen id : 5]
Output [2]: [SS_SOLD_DATE_SK#12239, SS_ITEM_SK#12241]
Input [2]: [SS_ITEM_SK#12241, SS_SOLD_DATE_SK#12239]

(11) Exchange
Input [2]: [SS_SOLD_DATE_SK#12239, SS_ITEM_SK#12241]
Arguments: hashpartitioning(ss_item_sk#12241, 5), ENSURE_REQUIREMENTS, [id=#7501]

(12) Sort [codegen id : 6]
Input [2]: [SS_SOLD_DATE_SK#12239, SS_ITEM_SK#12241]
Arguments: [ss_item_sk#12241 ASC NULLS FIRST], false, 0

(13) BatchScan
Output [4]: [I_ITEM_SK#12262, I_BRAND_ID#12269, I_CLASS_ID#12271, I_CATEGORY_ID#12273]
Format: orafile
OraPlan: 00 OraTableScan TPCDS.ITEM, [I_ITEM_SK#13629, I_BRAND_ID#13630, I_CLASS_ID#13631, I_CATEGORY_ID#13632], [oracolumnref(I_ITEM_SK#13629), oracolumnref(I_BRAND_ID#13630), oracolumnref(I_CLASS_ID#13631), oracolumnref(I_CATEGORY_ID#13632)], orabinaryopexpression(((isnotnull(I_BRAND_ID#12269) AND isnotnull(I_CLASS_ID#12271)) AND isnotnull(I_CATEGORY_ID#12273)))
PartitionSchema: struct<>
ReadSchema: struct<I_ITEM_SK:decimal(38,18),I_BRAND_ID:decimal(38,18),I_CLASS_ID:decimal(38,18),I_CATEGORY_ID:decimal(38,18)>
dsKey: DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
oraPushdownSQL: select "I_ITEM_SK", "I_BRAND_ID", "I_CLASS_ID", "I_CATEGORY_ID"
from TPCDS.ITEM
where (("I_BRAND_ID" IS NOT NULL AND "I_CLASS_ID" IS NOT NULL) AND "I_CATEGORY_ID" IS NOT NULL)

(14) Filter [codegen id : 7]
Input [4]: [I_ITEM_SK#12262, I_BRAND_ID#12269, I_CLASS_ID#12271, I_CATEGORY_ID#12273]
Condition : ((isnotnull(I_BRAND_ID#12269) AND isnotnull(I_CLASS_ID#12271)) AND isnotnull(I_CATEGORY_ID#12273))

(15) Exchange
Input [4]: [I_ITEM_SK#12262, I_BRAND_ID#12269, I_CLASS_ID#12271, I_CATEGORY_ID#12273]
Arguments: hashpartitioning(coalesce(i_brand_id#12269, 0E-18), isnull(i_brand_id#12269), coalesce(i_class_id#12271, 0E-18), isnull(i_class_id#12271), coalesce(i_category_id#12273, 0E-18), isnull(i_category_id#12273), 5), ENSURE_REQUIREMENTS, [id=#7509]

(16) Sort [codegen id : 8]
Input [4]: [I_ITEM_SK#12262, I_BRAND_ID#12269, I_CLASS_ID#12271, I_CATEGORY_ID#12273]
Arguments: [coalesce(i_brand_id#12269, 0E-18) ASC NULLS FIRST, isnull(i_brand_id#12269) ASC NULLS FIRST, coalesce(i_class_id#12271, 0E-18) ASC NULLS FIRST, isnull(i_class_id#12271) ASC NULLS FIRST, coalesce(i_category_id#12273, 0E-18) ASC NULLS FIRST, isnull(i_category_id#12273) ASC NULLS FIRST], false, 0

(17) BatchScan
Output [2]: [CS_ITEM_SK#12327, CS_SOLD_DATE_SK#12312]
Format: orafile
OraPlan: 00 OraTableScan TPCDS.CATALOG_SALES, [CS_ITEM_SK#13637, CS_SOLD_DATE_SK#13638], [oracolumnref(CS_ITEM_SK#13637), oracolumnref(CS_SOLD_DATE_SK#13638)]
PartitionSchema: struct<CS_SOLD_DATE_SK:decimal(38,18)>
ReadSchema: struct<CS_ITEM_SK:decimal(38,18)>
dsKey: DataSourceKey(jdbc:oracle:thin:@den02ads:1531/cdb1_pdb7.regress.rdbms.dev.us.oracle.com,tpcds)
oraPushdownSQL: select "CS_ITEM_SK", "CS_SOLD_DATE_SK"
from TPCDS.CATALOG_SALES
where "CS_SOLD_DATE_SK" IS NOT NULL

(18) Project [codegen id : 9]
Output [2]: [CS_SOLD_DATE_SK#12312, CS_ITEM_SK#12327]
Input [2]: [CS_ITEM_SK#12327, CS_SOLD_DATE_SK#12312]

(19) Exchange
Input [2]: [CS_SOLD_DATE_SK#12312, CS_ITEM_SK#12327]
Arguments: hashpartitioning(cs_item_sk#12327, 5), ENSURE_REQUIREMENTS, [id=#7516]

(20) Sort [codegen id : 10]
Input [2]: [CS_SOLD_DATE_SK#12312, CS_ITEM
Clone this wiki locally