You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@asterixdb.apache.org by "Vignesh Raghunathan (JIRA)" <ji...@apache.org> on 2016/09/04 18:37:20 UTC
[jira] [Created] (ASTERIXDB-1632) Query having subquery referring
to with clause returns incorrect results
Vignesh Raghunathan created ASTERIXDB-1632:
----------------------------------------------
Summary: Query having subquery referring to with clause returns incorrect results
Key: ASTERIXDB-1632
URL: https://issues.apache.org/jira/browse/ASTERIXDB-1632
Project: Apache AsterixDB
Issue Type: Bug
Environment: Master branch with latest commit 2b95d9ac95aa6f4dd847
Reporter: Vignesh Raghunathan
To reproduce the issue, run the following sqlpp statements:
{code}
drop dataverse sampdb if exists;
create dataverse sampdb;
use sampdb;
drop dataset samptable if exists;
drop type samptabletype if exists;
create type samptabletype as closed {
id: int8
};
create dataset samptable(samptabletype) primary key id;
insert into samptable ({'id' : 1});
insert into samptable ({'id' : 2});
insert into samptable ({'id' : 3});
with samptab as (
select id from samptable
)
select st1.id
from samptab st1
where st1.id > (select value avg(st2.id) from samptab st2);
{code}
The query doesn't return {id:3}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)