Knut Anders Hatlen <[email protected]> writes: > Another thing is that the ROW_NUMBER() implementation was more or less > completely rewritten in Derby 10.6 to address some bugs, so perhaps 10.6 > would handle this query differently.
I managed to reproduce the bug on 10.5.3.0 by adding an optimizer override that forced the use of a hash join. With 10.6.1.0 it looks like the optimizer is able to construct a hash join for the query, and I don't see the error any more. And a little more digging showed that the query stopped failing when the ROW_NUMBER rewrite went into the codeline (https://issues.apache.org/jira/browse/DERBY-3634). So I think you should be able to get around this problem either by upgrading or by adding the optimizer override suggested in the previous mail to force a nested loop join. -- Knut Anders
