[
https://issues.jboss.org/browse/TEIID-1494?page=com.atlassian.jira.plugin...
]
Steven Hawkins resolved TEIID-1494.
-----------------------------------
Resolution: Done
updated the logic to allow optional join hints to work with non-ansi joins even if where
criteria is present.
it is no longer needed to put additional optional hints on ansi joins. Instead of:
SELECT g2.e1 FROM /\*+optional\*/ ( /\*+optional\*/ pm1.g1 as g1 INNER JOIN
/\*+optional\*/ pm2.g2 ON g1.e1 = pm2.g2.e1) INNER JOIN /\*+optional\*/ pm2.g3 ON g1.e1 =
pm2.g3.e1
which has a leading optional hint, you have:
SELECT g2.e1 FROM ( /\*+optional\*/ pm1.g1 as g1 INNER JOIN /\*+optional\*/ pm2.g2 ON
g1.e1 = pm2.g2.e1) INNER JOIN /\*+optional\*/ pm2.g3 ON g1.e1 = pm2.g3.e1
or just:
SELECT g3.e1 FROM /\*+optional\*/ pm1.g1 as g1, /\*+optional\*/ pm2.g2, /\*+optional\*/
pm2.g3 WHERE g1.e1 = pm2.g2.e1 AND g1.e1 = pm2.g3.e1
I also added logic to ensure that optional briding tables will not be removed if the other
sides of the join are required for the query.
The docs were updated to cover these scenarios.
Allow the optional join hint to work with non-ansi joins
--------------------------------------------------------
Key: TEIID-1494
URL:
https://issues.jboss.org/browse/TEIID-1494
Project: Teiid
Issue Type: Feature Request
Components: Query Engine
Affects Versions: 7.4
Reporter: Steven Hawkins
Assignee: Steven Hawkins
Labels: optional_join
Fix For: 7.4
The optional join hint currently works only in ansi joins, and then only if the table(s)
are not used in where predicates forcing unnatural on clauses.
e.g. select b.* from /\*+optional\*/ a, b where a.x = b.x
should still allow a to be optional.
--
This message is automatically generated by JIRA.
For more information on JIRA, see:
http://www.atlassian.com/software/jira