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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.17.0
    • None
    • 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

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

              Dates

                Created:
                Updated:
                Resolved: