You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@asterixdb.apache.org by "Till Westmann (Jira)" <ji...@apache.org> on 2020/11/24 00:39:03 UTC
[jira] [Updated] (ASTERIXDB-2696) Incorrect result with nested
subplans
[ https://issues.apache.org/jira/browse/ASTERIXDB-2696?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Till Westmann updated ASTERIXDB-2696:
-------------------------------------
Fix Version/s: (was: 0.9.5)
0.9.6
> Incorrect result with nested subplans
> -------------------------------------
>
> Key: ASTERIXDB-2696
> URL: https://issues.apache.org/jira/browse/ASTERIXDB-2696
> Project: Apache AsterixDB
> Issue Type: Bug
> Components: COMP - Compiler
> Affects Versions: 0.9.4.1
> Reporter: Dmitry Lychagin
> Assignee: Dmitry Lychagin
> Priority: Major
> Fix For: 0.9.6
>
>
> The following query returns wrong result:
> {noformat}
> from [
> { "a": 1, "b": [ 10, 20, 30] },
> { "a": 1, "b": [ 40, 50, 60] },
> { "a": 1, "b": [ 70, 80, 90] },
> { "a": 2, "b": [ 100, 200, 300] },
> { "a": 2, "b": [ 400, 500, 600] },
> { "a": 2, "b": [ 700, 800, 900] }
> ] t
> group by a
> select a, sum( case when some x in b satisfies x >= 50 then 1 else 0 end) as s;
> {noformat}
> Current result:
> {noformat}
> { "a": 1, "s": 1 }
> { "a": 2, "s": 1 }
> {noformat}
> Correct result should be:
> {noformat}
> { "a": 1, "s": 2 }
> { "a": 2, "s": 3 }
> {noformat}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)