[
https://issues.jboss.org/browse/TEIIDDES-216?page=com.atlassian.jira.plug...
]
Barry LaFond edited comment on TEIIDDES-216 at 8/6/12 3:02 PM:
---------------------------------------------------------------
Tested with Teiid Designer 7.8 and resulting SQL after validating is:
{code:sql}
SELECT
b.INTKEY, b.STRINGKEY, b.INTNUM, b.STRINGNUM, b.FLOATNUM,
b.LONGNUM, b.DOUBLENUM, b.BYTENUM, b.DATEVALUE, b.TIMEVALUE,
b.TIMESTAMPVALUE, b.BOOLEANVALUE, b.CHARVALUE, b.SHORTVALUE,
b.BIGINTEGERVALUE, b.BIGDECIMALVALUE, b.OBJECTVALUE
FROM
bqt.SMALLA AS a INNER JOIN bqt.SMALLB AS b ON a.INTKEY = b.INTKEY AND ((a.INTNUM IS NULL)
OR (a.INTNUM = 11))
{code}
was (Author: blafond):
Tested with Teiid Designer 7.8 and resulting SQL after validating is:
{code:sql}
SELECT
b.INTKEY, b.STRINGKEY, b.INTNUM, b.STRINGNUM, b.FLOATNUM, b.LONGNUM, b.DOUBLENUM,
b.BYTENUM, b.DATEVALUE, b.TIMEVALUE, b.TIMESTAMPVALUE, b.BOOLEANVALUE, b.CHARVALUE,
b.SHORTVALUE, b.BIGINTEGERVALUE, b.BIGDECIMALVALUE, b.OBJECTVALUE, a.INTKEY AS INTKEY_1,
a.STRINGKEY AS STRINGKEY_1, a.INTNUM AS INTNUM_1, a.STRINGNUM AS STRINGNUM_1, a.FLOATNUM
AS FLOATNUM_1, a.LONGNUM AS LONGNUM_1, a.DOUBLENUM AS DOUBLENUM_1, a.BYTENUM AS BYTENUM_1,
a.DATEVALUE AS DATEVALUE_1, a.TIMEVALUE AS TIMEVALUE_1, a.TIMESTAMPVALUE AS
TIMESTAMPVALUE_1, a.BOOLEANVALUE AS BOOLEANVALUE_1, a.CHARVALUE AS CHARVALUE_1,
a.SHORTVALUE AS SHORTVALUE_1, a.BIGINTEGERVALUE AS BIGINTEGERVALUE_1, a.BIGDECIMALVALUE AS
BIGDECIMALVALUE_1, a.OBJECTVALUE AS OBJECTVALUE_1
FROM
bqt.SMALLA AS a INNER JOIN bqt.SMALLB AS b ON a.INTKEY = b.INTKEY AND ((a.INTNUM IS
NULL) OR (a.INTNUM = 11))
{code}
Designer removes parentheses around criteria in ansi join when using
compound ON
--------------------------------------------------------------------------------
Key: TEIIDDES-216
URL:
https://issues.jboss.org/browse/TEIIDDES-216
Project: Teiid Designer
Issue Type: Bug
Components: Transformations
Affects Versions: 6.1.0
Reporter: Marc Shirley
Assignee: Mark Drilling
Fix For: 8.0
In Designer, when validating a transformation that has compound criteria in an ansi join
statement's ON, the parentheses are removed and the order of operations is modified as
a result. This does not appear to occur when using the same parentheses structure in
WHERE criteria.
Before validation:
SELECT * FROM bqt.SMALLA AS a INNER JOIN bqt.SMALLB AS b ON (a.INTKEY = b.INTKEY) AND
(a.INTNUM IS NULL OR a.INTNUM = 11)
After validation:
SELECT * FROM bqt.SMALLA AS a INNER JOIN bqt.SMALLB AS b ON a.INTKEY = b.INTKEY AND
(a.INTNUM IS NULL) OR (a.INTNUM = 11)
After validating a second time:
SELECT * FROM bqt.SMALLA AS a INNER JOIN bqt.SMALLB AS b ON ((a.INTKEY = b.INTKEY) AND
(a.INTNUM IS NULL)) OR (a.INTNUM = 11)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see:
http://www.atlassian.com/software/jira