You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Jess Balint (Jira)" <ji...@apache.org> on 2019/10/26 23:22:00 UTC
[jira] [Updated] (CALCITE-3430) JDBC adapter generates extra alias
for VALUES when used in join
[ https://issues.apache.org/jira/browse/CALCITE-3430?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jess Balint updated CALCITE-3430:
---------------------------------
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. (was: 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.)
> 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
> Priority: Major
> Labels: sql
>
> 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.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)