[JBoss JIRA] Commented: (TEIID-1664) Teiid - Teradata queries containing LTRIM and RTRIM on the BQT booleanvalue column are returning unexpected BQT results
by Ramesh Reddy (JIRA)
[ https://issues.jboss.org/browse/TEIID-1664?page=com.atlassian.jira.plugin... ]
Ramesh Reddy commented on TEIID-1664:
-------------------------------------
3 is the only option IMO. Yes, I did not think about the bubbling up part.
> Teiid - Teradata queries containing LTRIM and RTRIM on the BQT booleanvalue column are returning unexpected BQT results
> -----------------------------------------------------------------------------------------------------------------------
>
> Key: TEIID-1664
> URL: https://issues.jboss.org/browse/TEIID-1664
> Project: Teiid
> Issue Type: Bug
> Components: Misc. Connectors
> Affects Versions: 7.4.1
> Reporter: Warren Gibson
> Assignee: Steven Hawkins
> Attachments: QT_teradata12_Push.vdb
>
>
> Teiid - Teradata queries containing LTRIM and RTRIM on the BQT booleanvalue column are returning unexpected results. The following query should be returning 22 rows but 0 rows are returned.
> SELECT intkey, booleanvalue FROM BQT1.SmallA WHERE LTRIM(BQT1.SmallA.BooleanValue) = 'true' ORDER BY intkey
> However, if the LTRIM is removed like (SELECT intkey, booleanvalue FROM BQT1.SmallA WHERE BQT1.SmallA.BooleanValue = 'true' ORDER BY intkey) 22 rows are returned.
> This should be logged against Teiid 7.4.1
> VDB attached.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 9 months
[JBoss JIRA] Commented: (TEIID-1664) Teiid - Teradata queries containing LTRIM and RTRIM on the BQT booleanvalue column are returning unexpected BQT results
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-1664?page=com.atlassian.jira.plugin... ]
Steven Hawkins commented on TEIID-1664:
---------------------------------------
That's quite unfortunate. We could:
1. add a KI that nested conversions will not work and thus results may not be as expected.
2. don't support convert (yikes)
3. add more code to properly unnest conversions:
in this case byte->boolean->string is the same as boolean->string
> Teiid - Teradata queries containing LTRIM and RTRIM on the BQT booleanvalue column are returning unexpected BQT results
> -----------------------------------------------------------------------------------------------------------------------
>
> Key: TEIID-1664
> URL: https://issues.jboss.org/browse/TEIID-1664
> Project: Teiid
> Issue Type: Bug
> Components: Misc. Connectors
> Affects Versions: 7.4.1
> Reporter: Warren Gibson
> Assignee: Steven Hawkins
> Attachments: QT_teradata12_Push.vdb
>
>
> Teiid - Teradata queries containing LTRIM and RTRIM on the BQT booleanvalue column are returning unexpected results. The following query should be returning 22 rows but 0 rows are returned.
> SELECT intkey, booleanvalue FROM BQT1.SmallA WHERE LTRIM(BQT1.SmallA.BooleanValue) = 'true' ORDER BY intkey
> However, if the LTRIM is removed like (SELECT intkey, booleanvalue FROM BQT1.SmallA WHERE BQT1.SmallA.BooleanValue = 'true' ORDER BY intkey) 22 rows are returned.
> This should be logged against Teiid 7.4.1
> VDB attached.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 9 months
[JBoss JIRA] Commented: (TEIID-1664) Teiid - Teradata queries containing LTRIM and RTRIM on the BQT booleanvalue column are returning unexpected BQT results
by Ramesh Reddy (JIRA)
[ https://issues.jboss.org/browse/TEIID-1664?page=com.atlassian.jira.plugin... ]
Ramesh Reddy commented on TEIID-1664:
-------------------------------------
It could not handle expressions like convert inside a convert, thus I did this
> Teiid - Teradata queries containing LTRIM and RTRIM on the BQT booleanvalue column are returning unexpected BQT results
> -----------------------------------------------------------------------------------------------------------------------
>
> Key: TEIID-1664
> URL: https://issues.jboss.org/browse/TEIID-1664
> Project: Teiid
> Issue Type: Bug
> Components: Misc. Connectors
> Affects Versions: 7.4.1
> Reporter: Warren Gibson
> Assignee: Steven Hawkins
> Attachments: QT_teradata12_Push.vdb
>
>
> Teiid - Teradata queries containing LTRIM and RTRIM on the BQT booleanvalue column are returning unexpected results. The following query should be returning 22 rows but 0 rows are returned.
> SELECT intkey, booleanvalue FROM BQT1.SmallA WHERE LTRIM(BQT1.SmallA.BooleanValue) = 'true' ORDER BY intkey
> However, if the LTRIM is removed like (SELECT intkey, booleanvalue FROM BQT1.SmallA WHERE BQT1.SmallA.BooleanValue = 'true' ORDER BY intkey) 22 rows are returned.
> This should be logged against Teiid 7.4.1
> VDB attached.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 9 months
[JBoss JIRA] Commented: (TEIID-1664) Teiid - Teradata queries containing LTRIM and RTRIM on the BQT booleanvalue column are returning unexpected BQT results
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-1664?page=com.atlassian.jira.plugin... ]
Steven Hawkins commented on TEIID-1664:
---------------------------------------
Ramesh,
In the Teradata.expressionToString handling intermediate converts are being removed, is there a reason for this? In general they are needed especially if the conversion is lossy - or in the case of boolean knows to convert between numeric and string values.
> Teiid - Teradata queries containing LTRIM and RTRIM on the BQT booleanvalue column are returning unexpected BQT results
> -----------------------------------------------------------------------------------------------------------------------
>
> Key: TEIID-1664
> URL: https://issues.jboss.org/browse/TEIID-1664
> Project: Teiid
> Issue Type: Bug
> Components: Misc. Connectors
> Affects Versions: 7.4.1
> Reporter: Warren Gibson
> Assignee: Steven Hawkins
> Attachments: QT_teradata12_Push.vdb
>
>
> Teiid - Teradata queries containing LTRIM and RTRIM on the BQT booleanvalue column are returning unexpected results. The following query should be returning 22 rows but 0 rows are returned.
> SELECT intkey, booleanvalue FROM BQT1.SmallA WHERE LTRIM(BQT1.SmallA.BooleanValue) = 'true' ORDER BY intkey
> However, if the LTRIM is removed like (SELECT intkey, booleanvalue FROM BQT1.SmallA WHERE BQT1.SmallA.BooleanValue = 'true' ORDER BY intkey) 22 rows are returned.
> This should be logged against Teiid 7.4.1
> VDB attached.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 9 months
[JBoss JIRA] Created: (TEIID-1648) Reading CLOB's from Teradata has issues and produces exception when stream is read from a different thread than what the clob was read from the resultset
by Van Halbert (JIRA)
Reading CLOB's from Teradata has issues and produces exception when stream is read from a different thread than what the clob was read from the resultset
---------------------------------------------------------------------------------------------------------------------------------------------------------
Key: TEIID-1648
URL: https://issues.jboss.org/browse/TEIID-1648
Project: Teiid
Issue Type: Bug
Components: Misc. Connectors
Affects Versions: 7.4.1
Reporter: Van Halbert
Assignee: Steven Hawkins
Priority: Critical
Attachments: JDBCQueryServlet.java
The initial problem was seen when running BQT testing against the teradata source. However, when debugging, the exception was occurring on the initial client read of the stream. After reading teradata jdbc driver doc, it talks about how its not thread safe and has issues when different threads are handling blobs/clobs. Which lead me to do a simple client test. 2 tests where run run thru a servlet that obtains the teradata connenction via jndi. Thet are as follows (attached is the sample code after the changes used for #2):
1. simple execute/select: execute select intkey, objectvalue from bqt1.smalla, for each row, obtain the clob and read the stream (no exception is seen)
2. execute select and read clob in a different thread: a new thread is created, passing in the clob, thread is started and then proceeds to try to read the stream, exceptions are seen
I'll attach the sample code.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 9 months
[JBoss JIRA] Commented: (TEIID-1664) Teiid - Teradata queries containing LTRIM and RTRIM on the BQT booleanvalue column are returning unexpected BQT results
by Warren Gibson (JIRA)
[ https://issues.jboss.org/browse/TEIID-1664?page=com.atlassian.jira.plugin... ]
Warren Gibson commented on TEIID-1664:
--------------------------------------
The DB contains 0 and 1 in the booleanvalue column. The source query is:
Source-specific command: SELECT g_0.INTKEY AS c_0, CASE WHEN g_0.BOOLEANVALUE = 0 THEN 0 WHEN g_0.BOOLEANVALUE IS NOT NULL THEN 1 END AS c_1 FROM smalla AS g_0 WHERE TRIM(LEADING FROM cast(g_0.BOOLEANVALUE AS varchar(100))) = 'true' ORDER BY c_0
> Teiid - Teradata queries containing LTRIM and RTRIM on the BQT booleanvalue column are returning unexpected BQT results
> -----------------------------------------------------------------------------------------------------------------------
>
> Key: TEIID-1664
> URL: https://issues.jboss.org/browse/TEIID-1664
> Project: Teiid
> Issue Type: Bug
> Components: Misc. Connectors
> Affects Versions: 7.4.1
> Reporter: Warren Gibson
> Assignee: Steven Hawkins
> Attachments: QT_teradata12_Push.vdb
>
>
> Teiid - Teradata queries containing LTRIM and RTRIM on the BQT booleanvalue column are returning unexpected results. The following query should be returning 22 rows but 0 rows are returned.
> SELECT intkey, booleanvalue FROM BQT1.SmallA WHERE LTRIM(BQT1.SmallA.BooleanValue) = 'true' ORDER BY intkey
> However, if the LTRIM is removed like (SELECT intkey, booleanvalue FROM BQT1.SmallA WHERE BQT1.SmallA.BooleanValue = 'true' ORDER BY intkey) 22 rows are returned.
> This should be logged against Teiid 7.4.1
> VDB attached.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 9 months
[JBoss JIRA] Commented: (TEIID-1664) Teiid - Teradata queries containing LTRIM and RTRIM on the BQT booleanvalue column are returning unexpected BQT results
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-1664?page=com.atlassian.jira.plugin... ]
Steven Hawkins commented on TEIID-1664:
---------------------------------------
You should inspect the source query / database values directly. Any non-zero non-null values should be interpreted as true, e.g. "WHERE TRIM(LEADING FROM CASE WHEN SmallA.BooleanValue = 0 THEN 'false' WHEN SmallA.BooleanValue IS NOT NULL THEN 'true' END) = 'true'", which seems fine.
> Teiid - Teradata queries containing LTRIM and RTRIM on the BQT booleanvalue column are returning unexpected BQT results
> -----------------------------------------------------------------------------------------------------------------------
>
> Key: TEIID-1664
> URL: https://issues.jboss.org/browse/TEIID-1664
> Project: Teiid
> Issue Type: Bug
> Components: Misc. Connectors
> Affects Versions: 7.4.1
> Reporter: Warren Gibson
> Assignee: Steven Hawkins
> Attachments: QT_teradata12_Push.vdb
>
>
> Teiid - Teradata queries containing LTRIM and RTRIM on the BQT booleanvalue column are returning unexpected results. The following query should be returning 22 rows but 0 rows are returned.
> SELECT intkey, booleanvalue FROM BQT1.SmallA WHERE LTRIM(BQT1.SmallA.BooleanValue) = 'true' ORDER BY intkey
> However, if the LTRIM is removed like (SELECT intkey, booleanvalue FROM BQT1.SmallA WHERE BQT1.SmallA.BooleanValue = 'true' ORDER BY intkey) 22 rows are returned.
> This should be logged against Teiid 7.4.1
> VDB attached.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 9 months
[JBoss JIRA] Commented: (TEIID-1664) Teiid - Teradata queries containing LTRIM and RTRIM on the BQT booleanvalue column are returning unexpected BQT results
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-1664?page=com.atlassian.jira.plugin... ]
Steven Hawkins commented on TEIID-1664:
---------------------------------------
What is the actual database type for the boolean column? The translator is assuming that teradata uses a numerical boolean. I can't find any reference to teradata supporting a boolean type.
Note that removing the ltrim function can change the query from performing a string comparison to a numerical or boolean comparison.
> Teiid - Teradata queries containing LTRIM and RTRIM on the BQT booleanvalue column are returning unexpected BQT results
> -----------------------------------------------------------------------------------------------------------------------
>
> Key: TEIID-1664
> URL: https://issues.jboss.org/browse/TEIID-1664
> Project: Teiid
> Issue Type: Bug
> Components: Misc. Connectors
> Affects Versions: 7.4.1
> Reporter: Warren Gibson
> Assignee: Steven Hawkins
> Attachments: QT_teradata12_Push.vdb
>
>
> Teiid - Teradata queries containing LTRIM and RTRIM on the BQT booleanvalue column are returning unexpected results. The following query should be returning 22 rows but 0 rows are returned.
> SELECT intkey, booleanvalue FROM BQT1.SmallA WHERE LTRIM(BQT1.SmallA.BooleanValue) = 'true' ORDER BY intkey
> However, if the LTRIM is removed like (SELECT intkey, booleanvalue FROM BQT1.SmallA WHERE BQT1.SmallA.BooleanValue = 'true' ORDER BY intkey) 22 rows are returned.
> This should be logged against Teiid 7.4.1
> VDB attached.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 9 months
[JBoss JIRA] Moved: (TEIID-1664) Teiid - Teradata queries containing LTRIM and RTRIM on the BQT booleanvalue column are returning unexpected BQT results
by Van Halbert (JIRA)
[ https://issues.jboss.org/browse/TEIID-1664?page=com.atlassian.jira.plugin... ]
Van Halbert moved SOA-3140 to TEIID-1664:
-----------------------------------------
Project: Teiid (was: JBoss Enterprise SOA Platform)
Key: TEIID-1664 (was: SOA-3140)
Affects Version/s: 7.4.1
(was: 5.2.0 GA)
Component/s: Misc. Connectors
(was: EDS)
Security: (was: Public)
> Teiid - Teradata queries containing LTRIM and RTRIM on the BQT booleanvalue column are returning unexpected BQT results
> -----------------------------------------------------------------------------------------------------------------------
>
> Key: TEIID-1664
> URL: https://issues.jboss.org/browse/TEIID-1664
> Project: Teiid
> Issue Type: Bug
> Components: Misc. Connectors
> Affects Versions: 7.4.1
> Reporter: Warren Gibson
> Assignee: Van Halbert
> Attachments: QT_teradata12_Push.vdb
>
>
> Teiid - Teradata queries containing LTRIM and RTRIM on the BQT booleanvalue column are returning unexpected results. The following query should be returning 22 rows but 0 rows are returned.
> SELECT intkey, booleanvalue FROM BQT1.SmallA WHERE LTRIM(BQT1.SmallA.BooleanValue) = 'true' ORDER BY intkey
> However, if the LTRIM is removed like (SELECT intkey, booleanvalue FROM BQT1.SmallA WHERE BQT1.SmallA.BooleanValue = 'true' ORDER BY intkey) 22 rows are returned.
> This should be logged against Teiid 7.4.1
> VDB attached.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 9 months