You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@asterixdb.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2020/02/19 23:11:00 UTC

[jira] [Commented] (ASTERIXDB-2696) Incorrect result with nested subplans

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

ASF subversion and git services commented on ASTERIXDB-2696:
------------------------------------------------------------

Commit f325e65854806f1438645b235f79be00477399b5 in asterixdb's branch refs/heads/master from Dmitry Lychagin
[ https://gitbox.apache.org/repos/asf?p=asterixdb.git;h=f325e65 ]

[ASTERIXDB-2696][COMP] Incorrect result with nested subplans

- user model changes: no
- storage format changes: no
- interface changes: no

Details:
- EliminateSubplanWithInputCardinalityOneRule was
  incorrectly inlining subplan inside another subplan

Change-Id: I232da4acc36e0389bfb61f728e8f2b00974053be
Reviewed-on: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/4964
Tested-by: Jenkins <je...@fulliautomatix.ics.uci.edu>
Integration-Tests: Jenkins <je...@fulliautomatix.ics.uci.edu>
Reviewed-by: Dmitry Lychagin <dm...@couchbase.com>
Reviewed-by: Ali Alsuliman <al...@gmail.com>


> 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.5
>
>
> 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)