Uploaded image for project: 'Apache AsterixDB'
  1. Apache AsterixDB
  2. ASTERIXDB-2782

Left outer nested loop join gives incorrect result on empty input

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 0.9.4
    • 0.9.5
    • RT - Runtime
    • None

    Description

      The below query which uses hash-join returns the expected result 

      // ds1 has one tuple {"id": "1", "f": 3}
      // ds2 is an empty dataset
      FROM ds1 LEFT OUTER JOIN ds2 ON ds1.f = ds2.f
      SELECT ds1, ds2;
      

      The returned result is

      { "ds1": { "id": "1", "f": 3 } }

      But the below equivalent query which uses nested-loop join returns incorrect result

      FROM ds1 LEFT OUTER JOIN ds2 ON ds1.f > ds2.f
      SELECT ds1, ds2;
      

      The returned result is

      { }
      

       

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            alsuliman Ali Alsuliman
            alsuliman Ali Alsuliman
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment