db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeremy Boynes (JIRA)" <derby-...@db.apache.org>
Subject [jira] Updated: (DERBY-7) Bug in NULLIF Function
Date Tue, 18 Jan 2005 16:03:19 GMT
     [ http://issues.apache.org/jira/browse/DERBY-7?page=history ]

Jeremy Boynes updated DERBY-7:

    Attachment: derby-nullif.patch

A larger patch that also deals with the use of untyped NULLs in CASE statements. This allows
NULLIF to be implemented as (CASE WHEN L=R THEN NULL ELSE L END). Adds a new testcase for
various CASE statements and has been tested with the derbylang suite on WinXP/Sun JVM 1.4.2.

This patch also checks that the values returned by the different branches are compatible using
the same check as the COALESCE function. Not sure if this is right, but at least it will be
consistent. It might be worth exploring if COALESCE can be implemented as a large CASE statement.

It also reuses the SQLState codes for a couple of errors as I am not sure of the policy for
changing the associated text or adding new ones.

> Bug in NULLIF Function
> ----------------------
>          Key: DERBY-7
>          URL: http://issues.apache.org/jira/browse/DERBY-7
>      Project: Derby
>         Type: Bug
>   Components: SQL
>     Versions:
>     Reporter: Tulika Agrawal
>     Priority: Minor
>  Attachments: Derby-7.txt, derby-nullif.patch
> Reporting for Christian d'Heureuse, filed on derby-dev list.
> The NULLIF built-in function of Cloudscape beta seems to accept
> only string values.
> Examples:
>  values nullif('a','b');
>  --> OK
>  values nullif(1,2);
>  --> Error message: "ERROR 42X89: Types 'CHAR' and
>      'INTEGER' are not type compatible. (Neither type
>      is assignable to the other type.)"

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
If you want more information on JIRA, or have a bug to report see:

View raw message