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

"SELECT *" in a NATURAL JOIN and JOIN USING query should output join columns only once

    Details

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

      Description

      "SELECT *" in a NATURAL JOIN and JOIN USING query should output join columns only once.

      For example,

      SELECT * FROM Emp NATURAL JOIN Dept

      should give columns

      {deptno, empno, ename, dname}

      . Note that deptno, the join key, has been moved to the start of the list only occurs once.

      This behavior is specified in the SQL standard. I don't know how I missed it.

      For outer joins, the value is coalesce(left.key, right.key) therefore never null.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                julianhyde Julian Hyde
                Reporter:
                julianhyde Julian Hyde
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: