[ 
https://issues.apache.org/jira/browse/SPARK-14968?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15265296#comment-15265296
 ] 

Herman van Hovell commented on SPARK-14968:
-------------------------------------------

[~jfc...@us.ibm.com] This is a correlated scalar subquery and this does this 
not work yet. I am currently working on this.

> TPC-DS query 1 resolved attribute(s) missing
> --------------------------------------------
>
>                 Key: SPARK-14968
>                 URL: https://issues.apache.org/jira/browse/SPARK-14968
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 2.0.0
>            Reporter: JESSE CHEN
>            Priority: Critical
>
> 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:
> {noformat}
> 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}
> {noformat}
> The query is:
> {noformat}
> 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
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org

Reply via email to