You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Jacques Nadeau (JIRA)" <ji...@apache.org> on 2014/06/09 08:49:36 UTC
[jira] [Updated] (DRILL-866) With clause causing TPCDS queries to
fail
[ https://issues.apache.org/jira/browse/DRILL-866?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jacques Nadeau updated DRILL-866:
---------------------------------
Assignee: Venki Korukanti
> With clause causing TPCDS queries to fail
> -----------------------------------------
>
> Key: DRILL-866
> URL: https://issues.apache.org/jira/browse/DRILL-866
> Project: Apache Drill
> Issue Type: Bug
> Components: SQL Parser
> Reporter: Krystal
> Assignee: Venki Korukanti
>
> TPCDS query 1 fails to validate throwing NPE, query 2 also has same problem
> Initial query:
> with customer_total_return as
> (select sr.sr_customer_sk as ctr_customer_sk
> ,sr.sr_store_sk as ctr_store_sk
> ,sum(sr.SR_REVERSED_CHARGE) as ctr_total_return
> from store_returns sr
> ,date_dim dd
> where sr.sr_returned_date_sk = dd.d_date_sk
> and dd.d_year =1998
> group by sr.sr_customer_sk
> ,sr.sr_store_sk)
> select * from ( select customer.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 store.s_store_sk = ctr1.ctr_store_sk
> and store.s_state = 'TN'
> and ctr1.ctr_customer_sk = customer.c_customer_sk
> order by customer.c_customer_id
> ) limit 100;
--
This message was sent by Atlassian JIRA
(v6.2#6252)