You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@asterixdb.apache.org by "Dmitry Lychagin (Jira)" <ji...@apache.org> on 2021/12/16 01:27:00 UTC
[jira] [Created] (ASTERIXDB-3000) Incorrect query result in SQL-compat mode
Dmitry Lychagin created ASTERIXDB-3000:
------------------------------------------
Summary: Incorrect query result in SQL-compat mode
Key: ASTERIXDB-3000
URL: https://issues.apache.org/jira/browse/ASTERIXDB-3000
Project: Apache AsterixDB
Issue Type: Bug
Components: COMP - Compiler
Affects Versions: 0.9.7
Reporter: Dmitry Lychagin
Assignee: Dmitry Lychagin
Fix For: 0.9.7
The following query returns wrong result in SQL-compat mode.
{noformat}
// requesttype=application/json
// param sql-compat:json=true
select r1
from range(1, 5) r1
where r1 IN (select r2 as r3 from range(1, 5) r2 order by r3 desc limit 2)
order by r1;
{noformat}
It returns
{noformat}
{ "r1": 1 }
{ "r1": 2 }
{noformat}
While the correct result is:
{noformat}
{ "r1": 4 }
{ "r1": 5 }
{noformat}
--
This message was sent by Atlassian Jira
(v8.20.1#820001)