]
Work on TEIID-5319 started by Steven Hawkins.
---------------------------------------------
SAP IQ translator wrong pushdown of query with multiple JOINs
-------------------------------------------------------------
Key: TEIID-5319
URL:
https://issues.jboss.org/browse/TEIID-5319
Project: Teiid
Issue Type: Bug
Components: Misc. Connectors
Affects Versions: 8.12.13.6_4
Reporter: Jan Stastny
Assignee: Steven Hawkins
Priority: Critical
For a query:
{code:sql}
SELECT BQT1.SmallA.IntKey AS SmallA_IntKey, BQT2.MediumB.IntKey AS MediumB_IntKey,
BQT2.LargeB.IntKey AS LargeB_IntKey
FROM
(
BQT1.SmallA LEFT OUTER JOIN BQT2.MediumB
ON BQT1.SmallA.IntKey = BQT2.MediumB.IntKey
)
RIGHT OUTER JOIN BQT2.LargeB
ON BQT2.MediumB.IntKey = BQT2.LargeB.IntKey
WHERE BQT2.LargeB.IntKey < 1500
{code}
The following source command is pushed to SAP IQ:
{code:sql}
SELECT g_1."intkey" AS c_0, g_2."intkey" AS c_1,
g_0."intkey" AS c_2
FROM
"bqt-server"."dvqe"."LargeB" AS g_0
LEFT OUTER JOIN
"bqt-server"."dvqe"."SmallA" AS g_1
INNER JOIN "bqt-server"."dvqe"."MediumB" AS g_2
ON g_1."intkey" = g_2."intkey"
ON g_2."intkey" = g_0."intkey"
AND g_2."intkey" < 1500
WHERE g_0."intkey" < 1500
{code}
Which results in parsing error.