Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-252

Scalar sub-query that returns 0 rows should become NULL value

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • None
    • None

    Description

      A scalar sub-query that returns 0 rows should become a NULL value. Currently it removes the whole row. For example,

      ```sql
      select ename, deptno, (select name from dept where deptno = emp.deptno)
      from emp
      ```

      should return a row 'Fred, 20, null' but that row is missing.

      The problem is that scalar sub-query is translated to a left join, and left join is incorrectly implemented as inner join.

      ---------------- Imported from GitHub ----------------
      Url: https://github.com/julianhyde/optiq/issues/252
      Created by: julianhyde
      Labels:
      Created at: Thu Apr 17 02:04:39 CEST 2014
      State: closed

      Attachments

        Activity

          People

            Unassigned Unassigned
            github-import GitHub Import
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: