drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Krystal (JIRA)" <j...@apache.org>
Subject [jira] [Created] (DRILL-866) TPDCS query 1 fails to validate
Date Fri, 30 May 2014 16:09:02 GMT
Krystal created DRILL-866:

             Summary: TPDCS query 1 fails to validate
                 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.

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
select * from ( select customer.c_customer_id
from customer_total_return ctr1
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

View raw message