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

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

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:

      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

        Activity

        There are no comments yet on this issue.

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development