Any comments on this?
thanks Shreyas
Shreyas Kaushik (JIRA) wrote:
[ http://issues.apache.org/jira/browse/DERBY-113?page=comments#action_57493 ]
Shreyas Kaushik commented on DERBY-113:
---------------------------------------
In the link http://incubator.apache.org/derby/manuals/reference/sqlj125.html#HDRSII-SQLJ-58560 there are two tables.
Table 5 - Assignments allowed by Derby Table 6 - Comparisions allowed by Derby
In case of this bug when a comparision is done between '1' and 1, such a comparision is not allowed as per the matrix given in Table 6.
Moreover Table 5 also mentions assignments are not allowed between integer and char types.
Looks like this might not be a bug after all.
Comparison does not perform implicit type conversion ----------------------------------------------------
Key: DERBY-113
URL: http://issues.apache.org/jira/browse/DERBY-113
Project: Derby
Type: Bug
Components: SQL
Reporter: Jeremy Boynes
The operands to a comparision operator are not implictly converted to the dominant type resulting in an unexpected exception:
For example:
ij> select * from dual where '1' = 1;
ERROR 42818: Comparisons between 'CHAR' and 'INTEGER' are not supported.
fails whereas
ij> select * from dual where cast('1' as int) = 1;
DUM&
----
X
works. The type escalation should be implicit.
