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

JDBC adapter generates extra alias for VALUES when used in join

    XMLWordPrintableJSON

    Details

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

      Description

      For Postgres and other DBs which support this, the generated SQL is (values (1, 'a'), (2, 'bb')) as t(x, y). When it's used in a join the SqlImplementor adds a unique alias and winds up rendering as (values (1, 'a'), (2, 'bb')) as t(x, y) as t0. Perhaps it just needs wrapped in parens, or we could create a unique alias in RelToSqlConverter and avoid generating another one in the result() method.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                jbalint@gmail.com Jess Balint
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated: