[JBoss JIRA] (TEIID-3474) Inconsistent results of RIGHT function for different datasources
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-3474?page=com.atlassian.jira.plugin... ]
Steven Hawkins updated TEIID-3474:
----------------------------------
Fix Version/s: 8.11
Affects Version/s: 7.7
(was: 8.7.1.6_2)
Component/s: JDBC Connector
> Inconsistent results of RIGHT function for different datasources
> ----------------------------------------------------------------
>
> Key: TEIID-3474
> URL: https://issues.jboss.org/browse/TEIID-3474
> Project: Teiid
> Issue Type: Bug
> Components: JDBC Connector
> Affects Versions: 7.7
> Environment: OS: Fedora 20
> arch: x86_64
> java: oracle 1.8
> Reporter: Juraj Duráni
> Assignee: Steven Hawkins
> Fix For: 8.11
>
>
> The RIGHT function returns different results for different datasources. Some of those results are inconsistent with definition of the RIGHT(x,y) function.
> =======
> +*Query: SELECT intkey, RIGHT(intkey, 1) FROM table ORDER BY intkey*+
> *Teradata, SQLServer, Sybase, Ingres, MySQL, Oracle (this result is OK):*
> 0 0
> 1 1
> 2 2
> ...
> 10 0
> 11 1
> ...
> 100 0
> 101 1
> *Postgres:*
> 0 0
> 1 1
> 2 2
> ...
> 10 10
> 11 11
> ...
> 100 100
> 101 101
> *DB2:*
> 0 " "
> 1 " "
> 2 " "
> ...
> 10 " "
> 11 " "
> ...
> 100 " "
> 101 " "
> =====
> +*Query:SELECT intkey, RIGHT(intkey, 2) FROM table ORDER BY intkey*+
> *SQLServer, Sybase, Ingress, MySQL, Teradata (this result is OK):*
> 0 0
> 1 1
> ...
> 10 10
> 11 11
> ...
> 100 00
> 101 01
> *Oracle:*
> 0 <null>
> 1 <null>
> 2 <null>
> ...
> 10 10
> 11 11
> ...
> 100 00
> 101 01
> *Postgres:*
> 0 0
> 1 1
> 2 2
> ...
> 10 10
> 11 11
> ...
> 100 100
> 101 101
> *DB2:*
> 0 " "
> 1 " "
> 2 " "
> ...
> 10 " "
> 11 " "
> ...
> 100 " "
> 101 " "
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
10 years, 11 months
[JBoss JIRA] (TEIID-3474) Inconsistent results of RIGHT function for different datasources
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-3474?page=com.atlassian.jira.plugin... ]
Steven Hawkins commented on TEIID-3474:
---------------------------------------
Yes, that was my mistake. I didn't see that the padding was determined by the type, rather than the value (which is different behavior than others, such as H2).
> Inconsistent results of RIGHT function for different datasources
> ----------------------------------------------------------------
>
> Key: TEIID-3474
> URL: https://issues.jboss.org/browse/TEIID-3474
> Project: Teiid
> Issue Type: Bug
> Affects Versions: 8.7.1.6_2
> Environment: OS: Fedora 20
> arch: x86_64
> java: oracle 1.8
> Reporter: Juraj Duráni
> Assignee: Steven Hawkins
>
> The RIGHT function returns different results for different datasources. Some of those results are inconsistent with definition of the RIGHT(x,y) function.
> =======
> +*Query: SELECT intkey, RIGHT(intkey, 1) FROM table ORDER BY intkey*+
> *Teradata, SQLServer, Sybase, Ingres, MySQL, Oracle (this result is OK):*
> 0 0
> 1 1
> 2 2
> ...
> 10 0
> 11 1
> ...
> 100 0
> 101 1
> *Postgres:*
> 0 0
> 1 1
> 2 2
> ...
> 10 10
> 11 11
> ...
> 100 100
> 101 101
> *DB2:*
> 0 " "
> 1 " "
> 2 " "
> ...
> 10 " "
> 11 " "
> ...
> 100 " "
> 101 " "
> =====
> +*Query:SELECT intkey, RIGHT(intkey, 2) FROM table ORDER BY intkey*+
> *SQLServer, Sybase, Ingress, MySQL, Teradata (this result is OK):*
> 0 0
> 1 1
> ...
> 10 10
> 11 11
> ...
> 100 00
> 101 01
> *Oracle:*
> 0 <null>
> 1 <null>
> 2 <null>
> ...
> 10 10
> 11 11
> ...
> 100 00
> 101 01
> *Postgres:*
> 0 0
> 1 1
> 2 2
> ...
> 10 10
> 11 11
> ...
> 100 100
> 101 101
> *DB2:*
> 0 " "
> 1 " "
> 2 " "
> ...
> 10 " "
> 11 " "
> ...
> 100 " "
> 101 " "
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
10 years, 11 months
[JBoss JIRA] (TEIID-3474) Inconsistent results of RIGHT function for different datasources
by Juraj Duráni (JIRA)
[ https://issues.jboss.org/browse/TEIID-3474?page=com.atlassian.jira.plugin... ]
Juraj Duráni commented on TEIID-3474:
-------------------------------------
DB2 - If you use "char(integerValue)" the result will have fixed length. That is expected behavior according to DB2 documentation [1]. But function "varchar(integerValue)" returns "usable" result [2].
[1] - http://www-01.ibm.com/support/knowledgecenter/SSEPGG_9.7.0/com.ibm.db2.lu...
[2] - http://www-01.ibm.com/support/knowledgecenter/SSEPGG_9.7.0/com.ibm.db2.lu...
> Inconsistent results of RIGHT function for different datasources
> ----------------------------------------------------------------
>
> Key: TEIID-3474
> URL: https://issues.jboss.org/browse/TEIID-3474
> Project: Teiid
> Issue Type: Bug
> Affects Versions: 8.7.1.6_2
> Environment: OS: Fedora 20
> arch: x86_64
> java: oracle 1.8
> Reporter: Juraj Duráni
> Assignee: Steven Hawkins
>
> The RIGHT function returns different results for different datasources. Some of those results are inconsistent with definition of the RIGHT(x,y) function.
> =======
> +*Query: SELECT intkey, RIGHT(intkey, 1) FROM table ORDER BY intkey*+
> *Teradata, SQLServer, Sybase, Ingres, MySQL, Oracle (this result is OK):*
> 0 0
> 1 1
> 2 2
> ...
> 10 0
> 11 1
> ...
> 100 0
> 101 1
> *Postgres:*
> 0 0
> 1 1
> 2 2
> ...
> 10 10
> 11 11
> ...
> 100 100
> 101 101
> *DB2:*
> 0 " "
> 1 " "
> 2 " "
> ...
> 10 " "
> 11 " "
> ...
> 100 " "
> 101 " "
> =====
> +*Query:SELECT intkey, RIGHT(intkey, 2) FROM table ORDER BY intkey*+
> *SQLServer, Sybase, Ingress, MySQL, Teradata (this result is OK):*
> 0 0
> 1 1
> ...
> 10 10
> 11 11
> ...
> 100 00
> 101 01
> *Oracle:*
> 0 <null>
> 1 <null>
> 2 <null>
> ...
> 10 10
> 11 11
> ...
> 100 00
> 101 01
> *Postgres:*
> 0 0
> 1 1
> 2 2
> ...
> 10 10
> 11 11
> ...
> 100 100
> 101 101
> *DB2:*
> 0 " "
> 1 " "
> 2 " "
> ...
> 10 " "
> 11 " "
> ...
> 100 " "
> 101 " "
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
10 years, 11 months
[JBoss JIRA] (TEIID-3474) Inconsistent results of RIGHT function for different datasources
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-3474?page=com.atlassian.jira.plugin... ]
Steven Hawkins commented on TEIID-3474:
---------------------------------------
Postgres - this is a bug in our compensation. We assume that the same logic that basically works for oracle, will work for postgresql. This is not true as pg doesn't like negative indexes in the substr function. We'll also update the logic so that when the source is version 9.1 and above, we'll use the right function directly.
Oracle - the negative indexing is apparently allowed to go beyond the first character, so we get null/empty results for strings that as smaller than the count. This will be addressed as well.
DB2 - this is a bug in DB2. Left with a char cast works just fine, as does right without a cast, but using right(char(val), count) just produces the wrong result. So we'll have to workaround that on our side.
> Inconsistent results of RIGHT function for different datasources
> ----------------------------------------------------------------
>
> Key: TEIID-3474
> URL: https://issues.jboss.org/browse/TEIID-3474
> Project: Teiid
> Issue Type: Bug
> Affects Versions: 8.7.1.6_2
> Environment: OS: Fedora 20
> arch: x86_64
> java: oracle 1.8
> Reporter: Juraj Duráni
> Assignee: Steven Hawkins
>
> The RIGHT function returns different results for different datasources. Some of those results are inconsistent with definition of the RIGHT(x,y) function.
> =======
> +*Query: SELECT intkey, RIGHT(intkey, 1) FROM table ORDER BY intkey*+
> *Teradata, SQLServer, Sybase, Ingres, MySQL, Oracle (this result is OK):*
> 0 0
> 1 1
> 2 2
> ...
> 10 0
> 11 1
> ...
> 100 0
> 101 1
> *Postgres:*
> 0 0
> 1 1
> 2 2
> ...
> 10 10
> 11 11
> ...
> 100 100
> 101 101
> *DB2:*
> 0 " "
> 1 " "
> 2 " "
> ...
> 10 " "
> 11 " "
> ...
> 100 " "
> 101 " "
> =====
> +*Query:SELECT intkey, RIGHT(intkey, 2) FROM table ORDER BY intkey*+
> *SQLServer, Sybase, Ingress, MySQL, Teradata (this result is OK):*
> 0 0
> 1 1
> ...
> 10 10
> 11 11
> ...
> 100 00
> 101 01
> *Oracle:*
> 0 <null>
> 1 <null>
> 2 <null>
> ...
> 10 10
> 11 11
> ...
> 100 00
> 101 01
> *Postgres:*
> 0 0
> 1 1
> 2 2
> ...
> 10 10
> 11 11
> ...
> 100 100
> 101 101
> *DB2:*
> 0 " "
> 1 " "
> 2 " "
> ...
> 10 " "
> 11 " "
> ...
> 100 " "
> 101 " "
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
10 years, 11 months
[JBoss JIRA] (TEIID-3475) Add a separate example module for embedded examples
by Kylin Soong (JIRA)
Kylin Soong created TEIID-3475:
----------------------------------
Summary: Add a separate example module for embedded examples
Key: TEIID-3475
URL: https://issues.jboss.org/browse/TEIID-3475
Project: Teiid
Issue Type: Feature Request
Components: Embedded
Affects Versions: 8.11
Reporter: Kylin Soong
Assignee: Kylin Soong
Fix For: 8.11
Add a separate example module for embedded examples, it will contain a runnable jar, which will load all available examples, it will also contain transaction manager, etc.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
10 years, 11 months
[JBoss JIRA] (TEIID-3474) Inconsistent results of RIGHT function for different datasources
by RH Bugzilla Integration (JIRA)
[ https://issues.jboss.org/browse/TEIID-3474?page=com.atlassian.jira.plugin... ]
RH Bugzilla Integration updated TEIID-3474:
-------------------------------------------
Bugzilla Update: Perform
Bugzilla References: https://bugzilla.redhat.com/show_bug.cgi?id=1221051
> Inconsistent results of RIGHT function for different datasources
> ----------------------------------------------------------------
>
> Key: TEIID-3474
> URL: https://issues.jboss.org/browse/TEIID-3474
> Project: Teiid
> Issue Type: Bug
> Affects Versions: 8.7.1.6_2
> Environment: OS: Fedora 20
> arch: x86_64
> java: oracle 1.8
> Reporter: Juraj Duráni
> Assignee: Steven Hawkins
>
> The RIGHT function returns different results for different datasources. Some of those results are inconsistent with definition of the RIGHT(x,y) function.
> =======
> +*Query: SELECT intkey, RIGHT(intkey, 1) FROM table ORDER BY intkey*+
> *Teradata, SQLServer, Sybase, Ingres, MySQL, Oracle (this result is OK):*
> 0 0
> 1 1
> 2 2
> ...
> 10 0
> 11 1
> ...
> 100 0
> 101 1
> *Postgres:*
> 0 0
> 1 1
> 2 2
> ...
> 10 10
> 11 11
> ...
> 100 100
> 101 101
> *DB2:*
> 0 " "
> 1 " "
> 2 " "
> ...
> 10 " "
> 11 " "
> ...
> 100 " "
> 101 " "
> =====
> +*Query:SELECT intkey, RIGHT(intkey, 2) FROM table ORDER BY intkey*+
> *SQLServer, Sybase, Ingress, MySQL, Teradata (this result is OK):*
> 0 0
> 1 1
> ...
> 10 10
> 11 11
> ...
> 100 00
> 101 01
> *Oracle:*
> 0 <null>
> 1 <null>
> 2 <null>
> ...
> 10 10
> 11 11
> ...
> 100 00
> 101 01
> *Postgres:*
> 0 0
> 1 1
> 2 2
> ...
> 10 10
> 11 11
> ...
> 100 100
> 101 101
> *DB2:*
> 0 " "
> 1 " "
> 2 " "
> ...
> 10 " "
> 11 " "
> ...
> 100 " "
> 101 " "
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
10 years, 11 months
[JBoss JIRA] (TEIID-3474) Inconsistent results of RIGHT function for different datasources
by Juraj Duráni (JIRA)
Juraj Duráni created TEIID-3474:
-----------------------------------
Summary: Inconsistent results of RIGHT function for different datasources
Key: TEIID-3474
URL: https://issues.jboss.org/browse/TEIID-3474
Project: Teiid
Issue Type: Bug
Affects Versions: 8.7.1.6_2
Environment: OS: Fedora 20
arch: x86_64
java: oracle 1.8
Reporter: Juraj Duráni
Assignee: Steven Hawkins
The RIGHT function returns different results for different datasources. Some of those results are inconsistent with definition of the RIGHT(x,y) function.
=======
+*Query: SELECT intkey, RIGHT(intkey, 1) FROM table ORDER BY intkey*+
*Teradata, SQLServer, Sybase, Ingres, MySQL, Oracle (this result is OK):*
0 0
1 1
2 2
...
10 0
11 1
...
100 0
101 1
*Postgres:*
0 0
1 1
2 2
...
10 10
11 11
...
100 100
101 101
*DB2:*
0 " "
1 " "
2 " "
...
10 " "
11 " "
...
100 " "
101 " "
=====
+*Query:SELECT intkey, RIGHT(intkey, 2) FROM table ORDER BY intkey*+
*SQLServer, Sybase, Ingress, MySQL, Teradata (this result is OK):*
0 0
1 1
...
10 10
11 11
...
100 00
101 01
*Oracle:*
0 <null>
1 <null>
2 <null>
...
10 10
11 11
...
100 00
101 01
*Postgres:*
0 0
1 1
2 2
...
10 10
11 11
...
100 100
101 101
*DB2:*
0 " "
1 " "
2 " "
...
10 " "
11 " "
...
100 " "
101 " "
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
10 years, 11 months