You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Krystal (JIRA)" <ji...@apache.org> on 2014/05/30 18:17:03 UTC

[jira] [Updated] (DRILL-866) With clause causing TPDCS queries to fail

     [ https://issues.apache.org/jira/browse/DRILL-866?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Krystal updated DRILL-866:
--------------------------

    Description: 
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;




  was:
TPCDS query 1 fails to validate throwing NPE.

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;




        Summary: With clause causing TPDCS queries to fail  (was: TPDCS query 1 fails to validate)

> With clause causing TPDCS 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
>
> 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)