You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Roman Churganov (Jira)" <ji...@apache.org> on 2020/09/22 07:00:11 UTC
[jira] [Updated] (CALCITE-4272) Incorrect sub-query to JDBC driver
[ https://issues.apache.org/jira/browse/CALCITE-4272?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Roman Churganov updated CALCITE-4272:
-------------------------------------
Description:
run a query like
{{select t.id, t.c11 from foo t join bar tt on t.id = tt.id limit 10}}
calcite makes a sub-query to JDBC driver like
SELECT "t0"."ID", "t0"."C11"
FROM ( SELECT * FROM "FOO" INNER JOIN (SELECT "ID" FROM "BAR") AS "t" ON "FOO"."ID" = "t"."ID"
FETCH NEXT 10 ROWS ONLY ) AS "t0"
which cannot be executed since ID column present in both tables, see example in attachment
was:
run a query like
{quote}select t.id, t.c11 from foo t join bar tt on t.id = tt.id limit 10
{quote}
calcite makes a sub-query to JDBC driver like
{quote}SELECT "t0"."ID", "t0"."C11"
* FROM ( SELECT * FROM "FOO" INNER JOIN (SELECT "ID" FROM "BAR") AS "t" ON "FOO"."ID" = "t"."ID"
* FETCH NEXT 10 ROWS ONLY ) AS "t0"
{quote}
which cannot be executed since ID column present in both tables, see example in attachment
> Incorrect sub-query to JDBC driver
> ----------------------------------
>
> Key: CALCITE-4272
> URL: https://issues.apache.org/jira/browse/CALCITE-4272
> Project: Calcite
> Issue Type: Bug
> Components: core
> Affects Versions: 1.23.0
> Reporter: Roman Churganov
> Priority: Major
> Attachments: podd-tests.zip
>
>
> run a query like
> {{select t.id, t.c11 from foo t join bar tt on t.id = tt.id limit 10}}
> calcite makes a sub-query to JDBC driver like
> SELECT "t0"."ID", "t0"."C11"
> FROM ( SELECT * FROM "FOO" INNER JOIN (SELECT "ID" FROM "BAR") AS "t" ON "FOO"."ID" = "t"."ID"
> FETCH NEXT 10 ROWS ONLY ) AS "t0"
>
> which cannot be executed since ID column present in both tables, see example in attachment
>
>
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)