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

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.21.0
    • 1.23.0
    • jdbc-adapter
    • 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

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

              Dates

                Created:
                Updated:
                Resolved: