[ https://issues.apache.org/jira/browse/ASTERIXDB-2750?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17143221#comment-17143221 ]
ASF subversion and git services commented on ASTERIXDB-2750: ------------------------------------------------------------ Commit 0eeeed149baacba6751c422ea0e4324b268f5cf4 in asterixdb's branch refs/heads/master from Dmitry Lychagin [ https://gitbox.apache.org/repos/asf?p=asterixdb.git;h=0eeeed1 ] [ASTERIXDB-2750][COMP] Incorrect result with unnest and join - user model changes: no - storage format changes: no - interface changes: no Details: - Fix incorrect result when FROM clause contains simple unnest (",") followed by JOIN Change-Id: Icfd174ad099aaf24f9553349b3d417d64f9c70b5 Reviewed-on: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/6824 Integration-Tests: Jenkins <jenk...@fulliautomatix.ics.uci.edu> Tested-by: Jenkins <jenk...@fulliautomatix.ics.uci.edu> Reviewed-by: Till Westmann <ti...@apache.org> > Incorrect result with simple unnest (",") followed by JOIN > ---------------------------------------------------------- > > Key: ASTERIXDB-2750 > URL: https://issues.apache.org/jira/browse/ASTERIXDB-2750 > 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 > > > Simple unnest (",") should be equivalent to using UNNEST keyword. However a > combination of simple unnest followed by JOIN produces incorrect result. > Consider these 3 queries which should return the same result (24 = 2*3*4): > Q1: (UNNEST then JOIN ON TRUE) > {noformat} > with > t1 as [ { "x": 1, "y": [10, 11, 12] }, { "x": 2, "y": [20, 21, 22] } ], > t2 as [ 100, 101, 102, 103 ] > from t1 as t1 unnest t1.y as y join t2 as t2 on true > select value count(*) > {noformat} > Correct: returns 24 as expected. > Q2: ("," then ",") > {noformat} > with > t1 as [ { "x": 1, "y": [10, 11, 12] }, { "x": 2, "y": [20, 21, 22] } ], > t2 as [ 100, 101, 102, 103 ] > from t1 as t1, t1.y as y, t2 as t2 > select value count(*) > {noformat} > Correct: returns 24 as expected. > Q3: ("," then JOIN ON TRUE) > {noformat} > with > t1 as [ { "x": 1, "y": [10, 11, 12] }, { "x": 2, "y": [20, 21, 22] } ], > t2 as [ 100, 101, 102, 103 ] > from t1 as t1, t1.y as y join t2 as t2 on true > select value count(*) > {noformat} > INCORRECT: returns 48 -- This message was sent by Atlassian Jira (v8.3.4#803005)