db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Amit Handa (JIRA)" <derby-...@db.apache.org>
Subject [jira] Commented: (DERBY-7) Bug in NULLIF Function
Date Tue, 28 Dec 2004 08:49:11 GMT
     [ http://nagoya.apache.org/jira/browse/DERBY-7?page=comments#action_57082 ]
     
Amit Handa commented on DERBY-7:
--------------------------------

I think we agree on one thing for nullif(l,r),
the datatype of what is returned will be of type l.

Also

 The expression
 values nullif(1,1)
 should return the value
 cast(null as int) 

gives the same result as output.

Some other things to note  

1. nullif('a','b');
2. nullif(1,2);

3. nullif('a', 1);
4. nullif(1, 'a');
5. nullif(CAST(NULL as Char(1)), 1)
6. nullif(1, CAST(NULL as Char(1)))

Only 1 and 2 work with the fix, rest all fail.

So kindly let me know if you guys approve the fix. 
If not, kindly update what is missing which needs to be fixed or is not being fixed with the
patch proposed.

Please do vote in favour or against with some justification.

> Bug in NULLIF Function
> ----------------------
>
>          Key: DERBY-7
>          URL: http://nagoya.apache.org/jira/browse/DERBY-7
>      Project: Derby
>         Type: Bug
>   Components: SQL
>     Versions: 10.0.2.0
>     Reporter: Tulika Agrawal
>     Priority: Minor

>
> Reporting for Christian d'Heureuse, filed on derby-dev list.
> The NULLIF built-in function of Cloudscape 10.0.1.0 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:
   http://nagoya.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


Mime
View raw message