You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@asterixdb.apache.org by "Ali Alsuliman (Jira)" <ji...@apache.org> on 2020/09/24 00:24:00 UTC

[jira] [Created] (ASTERIXDB-2782) Left outer nested loop join gives incorrect result on empty input

Ali Alsuliman created ASTERIXDB-2782:
----------------------------------------

             Summary: Left outer nested loop join gives incorrect result on empty input
                 Key: ASTERIXDB-2782
                 URL: https://issues.apache.org/jira/browse/ASTERIXDB-2782
             Project: Apache AsterixDB
          Issue Type: Bug
          Components: RT - Runtime
    Affects Versions: 0.9.4
            Reporter: Ali Alsuliman
            Assignee: Ali Alsuliman
             Fix For: 0.9.5


The below query which uses hash-join returns the expected result 
{code:java}
// ds1 has one tuple {"id": "1", "f": 3}
// ds2 is an empty dataset
FROM ds1 LEFT OUTER JOIN ds2 ON ds1.f = ds2.fSELECT ds1, ds2;
{code}
The returned result is
{code:java}
{ "ds1": { "id": "1", "f": 3 } }{code}
But the below equivalent query which uses nested-loop join returns incorrect result
{code:java}
FROM ds1 LEFT OUTER JOIN ds2 ON ds1.f > ds2.fSELECT ds1, ds2;
{code}
The returned result is
{code:java}
{ }
{code}
 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)