]
Steven Hawkins commented on TEIID-3474:
---------------------------------------
Ok, yes those results are correct given the conversion of doublenum to string - which for
teradata uses scientific notation. This falls under the general caveat we have that the
source conversions to string are not always the same as the engine. In situations where
it causes a user an issue though we do see if a fix is appropriate.
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.7.1.6_2, 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 " "