[teiid-issues] [JBoss JIRA] (TEIID-4135) Invalid query when using recursive CTE with translators that do not suport RCTE pushdown
Steven Hawkins (JIRA)
issues at jboss.org
Sun Jun 5 19:44:01 EDT 2016
[ https://issues.jboss.org/browse/TEIID-4135?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Steven Hawkins closed TEIID-4135.
---------------------------------
> Invalid query when using recursive CTE with translators that do not suport RCTE pushdown
> ----------------------------------------------------------------------------------------
>
> Key: TEIID-4135
> URL: https://issues.jboss.org/browse/TEIID-4135
> Project: Teiid
> Issue Type: Bug
> Components: JDBC Connector
> Affects Versions: 8.12.x
> Reporter: Andrej Šmigala
> Assignee: Steven Hawkins
> Fix For: 9.0, 8.12.5
>
>
> When running a recursive common table expression query against a source that does not support recursive cte pushdown, only the recursive part of the query is pushed, which fails, since it references a non-existent table (the cte).
> E. g. the query
> {code:sql}
> WITH tmp_cte(id, fk, lvl) AS (
> SELECT id, fk, 0 as lvl FROM SourceModel.cte_source WHERE fk IS NULL
> UNION ALL
> SELECT e.id, e.fk, lvl + 1 as lvl FROM SourceModel.cte_source AS e INNER JOIN tmp_cte AS ecte ON ecte.id = e.fk
> )
> SELECT * FROM tmp_cte
> {code}
> against a PostreSQL source results in {noformat}Remote org.postgresql.util.PSQLException: ERROR: relation "tmp_cte" does not exist{noformat}
> because this query is pushed down:
> {code:sql}SELECT g_0.id, g_0.fk, g_0.lvl FROM tmp_cte AS g_0{code}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
More information about the teiid-issues
mailing list