Yip Ng <[EMAIL PROTECTED]> writes:

>> On 2/22/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> 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.

Thanks Yip and Mamta for your help on this :) I've logged 

https://issues.apache.org/jira/browse/DERBY-2370

for this.

-- 
dt

Reply via email to