Jess Balint created CALCITE-3430:
------------------------------------

             Summary: JDBC adapter generates extra alias for VALUES when used 
in join
                 Key: CALCITE-3430
                 URL: https://issues.apache.org/jira/browse/CALCITE-3430
             Project: Calcite
          Issue Type: Bug
          Components: jdbc-adapter
    Affects Versions: 1.21.0
            Reporter: Jess Balint


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, of we could create a 
unique alias in RelToSqlConverter and avoid generating another one in the 
{{result()}} method.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to