db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yip Ng" <yipng...@gmail.com>
Subject Re: Is this a bug in EXISTS?
Date Fri, 23 Feb 2007 08:08:31 GMT
> On 2/22/07, Dyre.Tjeldvoll@sun.com <Dyre.Tjeldvoll@sun.com> wrote:
>
>
>It looks like this could be related to the use of an AnyResultSet for
>the predicate. When EXISTS is applied to a SELECT it seems like the
>query is re-written as a join... (lots of guessing and hand-waving
>here...).
>

I believe its probably got to do with the EXISTS subquery transforming
the original RCL to
a TRUE boolean value for the INTERSECT.  So during row comparison at
execution time
for INTERSECT processing since true == true(thus intersects), so it
will always return 'BAD'.  Likewise,

select * from ( values 'OK' ) as T where exists (values 1 except values 2);

This supposedly should return 'OK' but because of the boolean
transformation mentioned
above for EXISTS subquery, it will return no rows for EXCEPT
processing.  So a fix
should be apply in this area.


Regards,
Yip Ng

Mime
View raw message