drill-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Krystal (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (DRILL-866) With clause causing TPDCS queries to fail
Date Fri, 30 May 2014 16:17:03 GMT

     [ 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)

Mime
View raw message