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

Re-aliasing of VALUES that has column aliases produces wrong SQL in the JDBC adapter

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.21.0
    • Fix Version/s: 1.23.0
    • Component/s: jdbc-adapter
    • Labels:
      None

      Description

      Rendering a VALUES relnode to e.g. PostgreSQL will produce FROM (VALUES((1))) AS t(col_alias) where "t" is a static alias. When e.g. joining with such a VALUES, the RelToSqlConverter tries to re-alias this with a unique alias, but fails because it produces FROM (VALUES((1))) AS t(col_alias) AS newAlias.

      The fix is to replace the static table alias instead.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                christian.beikov Christian Beikov
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: