asterixdb-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vignesh Raghunathan (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (ASTERIXDB-1676) Query with aggregate functions in with and where clause doesn't return result
Date Thu, 06 Oct 2016 06:02:20 GMT

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

Vignesh Raghunathan commented on ASTERIXDB-1676:
------------------------------------------------

This isn't reproducible anymore. Something should have been wrong with my setup

> Query with aggregate functions in with and where clause doesn't return result
> -----------------------------------------------------------------------------
>
>                 Key: ASTERIXDB-1676
>                 URL: https://issues.apache.org/jira/browse/ASTERIXDB-1676
>             Project: Apache AsterixDB
>          Issue Type: Bug
>         Environment: Master branch with latest commit c21de4d89a06726851ea9a54
>            Reporter: Vignesh Raghunathan
>            Assignee: Yingyi Bu
>
> To reproduce the issue, run the following sql++ statements:
> {code}
> drop dataverse tpcds if exists;
> create dataverse tpcds;
> use tpcds;
> create type tpcds.store_returns_type as
>  closed {
>   sr_customer_sk : int64,
>   sr_fee : double?
> }
> create dataset store_returns (store_returns_type) primary key sr_customer_sk;
> with customer_total_return as
> (select sr_customer_sk as ctr_customer_sk
> ,sum(sr_fee) as ctr_total_return
> from store_returns
> group by sr_customer_sk)
> select  ctr_customer_sk
> from customer_total_return ctr1
> where ctr1.ctr_total_return > (
>     select value (avg(ctr2.ctr_total_return)*1.2)
>     from customer_total_return ctr2
>     where ctr1.ctr_store_sk = ctr2.ctr_store_sk)[0]
> limit 1;
> {code}



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

Mime
View raw message