[Bug 10651] Optimisation avoiding sorts (K2-OrderbyExprWithout-10 & K2-OrderbyExprWithout-40)


--- Comment #2 from Martin Probst <Probst_Martin@emc.com> 2010-09-28 06:51:49 UTC ---
The query processor can statically determine that the order by specification
will always yield an identical value for each iteration of the loop. This means
the order by doesn't influence the order of the result.

However according to the specification, for a non-stable order, the relative
order of two tuples in the tuple stream is undefined if their order by specs
are identical (i.e., not < or >).

That means, the processor is free to return the sequence of tuples in any

Of course with this query, there isn't any reason to do that, but if you had a
complicated path expression that would require intermediate sorting, this could
very well happen.

In any case, this is just a silly query. Making the let clause depend on the
for binding will fix the issue and test what the author originally wanted to
test, so we should just fix it.

Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

Received on Tuesday, 28 September 2010 06:51:51 UTC