Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-14968

TPC-DS query 1 resolved attribute(s) missing

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Duplicate
    • 2.0.0
    • None
    • SQL
    • None

    Description

      This is a regression from a week ago. Failed to generate plan for query 1 in TPCDS using 0427 build from
      people.apache.org/~pwendell/spark-nightly/spark-master-bin/latest/.

      Was working in build from 0421.

      The error is:

      16/04/27 07:00:59 INFO spark.SparkContext: Created broadcast 3 from processCmd at CliDriver.java:376
      16/04/27 07:00:59 INFO datasources.FileSourceStrategy: Planning scan with bin packing, max size: 4194304 bytes, open cost is considered as scanning 4194304 bytes.
      Error in query: resolved attribute(s) ctr_store_sk#2#535 missing from ctr_store_sk#2,ctr_total_return#3 in operator !Filter (ctr_store_sk#2#535 = ctr_store_sk#2);
      16/04/27 07:00:59 INFO handler.ContextHandler: stopped o.s.j.s.ServletContextHandler{/static/sql,null}
      16/04/27 07:00:59 INFO handler.ContextHandler: stopped o.s.j.s.ServletContextHandler{/SQL/execution/json,null}
      
      

      The query is:

      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
      
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              jfchen@us.ibm.com JESSE CHEN
              Votes:
              2 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: