db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Knut Anders Hatlen (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DERBY-6577) Quantified comparison returns wrong result in CASE, COALESCE, IN and BETWEEN
Date Fri, 16 May 2014 11:23:13 GMT

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

Knut Anders Hatlen commented on DERBY-6577:
-------------------------------------------

All tests passed, so I committed the 1a patch. I did notice that there were some other callers
of preprocess() that also discarded the return value. I haven't been able to create a test
case that breaks because of it, but it might be a good idea to fix them just in case. I'll
post a new 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
>         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)

Mime
View raw message