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

JDBC adapter generates extra alias for VALUES when used in join

Attach filesAttach ScreenshotAdd voteVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.21.0
    • None
    • jdbc-adapter

    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

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            jbalint@gmail.com Jess Balint

            Dates

              Created:
              Updated:

              Slack

                Issue deployment