You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Dag H. Wanvik (JIRA)" <ji...@apache.org> on 2014/05/16 13:12:49 UTC

[jira] [Comment Edited] (DERBY-6577) Quantified comparison returns wrong result in CASE, COALESCE, IN and BETWEEN

    [ https://issues.apache.org/jira/browse/DERBY-6577?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13999532#comment-13999532 ] 

Dag H. Wanvik edited comment on DERBY-6577 at 5/16/14 2:14 AM:
---------------------------------------------------------------

+1 to the bug fix and also to making the proactive assignments in the second patch.


was (Author: dagw):
+1 to the bug fix and also to making the preactive assignments in the second patch.

> Quantified comparison returns wrong result in CASE, COALESCE, IN and BETWEEN
> ----------------------------------------------------------------------------
>
>                 Key: DERBY-6577
>                 URL: https://issues.apache.org/jira/browse/DERBY-6577
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.11.0.0, 10.10.2.0
>            Reporter: Knut Anders Hatlen
>            Assignee: Knut Anders Hatlen
>             Fix For: 10.11.0.0
>
>         Attachments: d6577-1a.diff, d6577-2a.diff
>
>
> I'm seeing this on head of trunk:
> {noformat}
> ij> select c, c = all (values 'Y'), case when c = all (values 'Y') then true else false end from (values 'Y', 'N') v(c);
> C|2    |3    
> -------------
> Y|true |false
> N|false|true 
> 2 rows selected
> {noformat}
> Column 2 and column 3 should have the same value, but something seems to go wrong when the quantified comparison is used in a CASE expression.
> I'm seeing the expected result on 10.10.2.0, though:
> {noformat}
> ij> select c, c = all (values 'Y'), case when c = all (values 'Y') then true else false end from (values 'Y', 'N') v(c);
> C|2    |3    
> -------------
> Y|true |true 
> N|false|false
> 2 rows selected
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.2#6252)