db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel John Debrunner <...@debrunners.com>
Subject Re: [jira] Updated: (DERBY-7) Bug in NULLIF Function
Date Tue, 11 Jan 2005 01:20:30 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Amit Handa (JIRA) wrote:

>      [ http://issues.apache.org/jira/browse/DERBY-7?page=history ]
>
> Amit Handa updated DERBY-7:
> ---------------------------
>
>     Attachment: Derby-7.txt
>
> Submitting Patch as per discussion.

I have concerns similar to Satheesh's and I think raised by Christian a
while back.

>> values nullif(1,2);
>> --> Error message: "ERROR 42X89: Types 'CHAR' and
>>     'INTEGER' are not type compatible. (Neither type
>>     is assignable to the other type.)"

So where is the CHAR type coming from, since the expressions are both
INTEGER in this case? That would seem to be the root of the bug, not the
current valid(?) checking of compatible expression types.

If the CHAR is coming from the NULL constant inserted into the tree then
it seems that the NULL constant should be automatically typed to the
left expression of the NULLIF.

Or am I way off base?

Dan.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFB4yneIv0S4qsbfuQRAuaQAJwKQMyE284BvKXyIqEUhpblIyBMuQCg00W+
WgrrdMhU9zYIfrj2Datzn4I=
=KCPs
-----END PGP SIGNATURE-----


Mime
View raw message