Thomas Nielsen wrote:
A B (JIRA) wrote:
I think the condition may need to be narrowed down even further: EXISTS
subqueries _are_ allowed to be flattened from a WHERE clause _if_ that subquery's WHERE clause does not itself contain another subquery.
Correct - the updated patch I'm working on attempts to skip flattening only in this scenario as per the javadoc in derby-3301-1.diff, and still flatten EXISTS subqueries without a subquery in the where clause.

Okay, great. I didn't quite get that from the first version of the patch/comments. Thanks for clarifying.

If at all possible, I think it'd be better to fix the flattening condition for the specific situation of nested subqueries than to completely disable WHERE clause flattening for EXISTS subqueries.
That is the intent of the upcoming patch.

Ok, this sounds good :)

I shared your fear, but suites.All actually ran cleanly with the patch applied.

What about derbyall? My guess is that most tests which verify query plans currently reside in derbyall as they have not yet been converted to JUnit. If there are no tests to explicitly check for the occurrence of EXISTS subquery flattening, then that seems like an oversight in the testing for such flattening...but that would be a separate issue altogether (not something you'd have to address for DERBY-3301).

Army

Reply via email to