This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 8247 - [XQTS] A number of tests should use stable order by.
Summary: [XQTS] A number of tests should use stable order by.
Status: CLOSED FIXED
Alias: None
Product: XML Query Test Suite
Classification: Unclassified
Component: XML Query Test Suite (show other bugs)
Version: unspecified
Hardware: PC Windows NT
: P2 normal
Target Milestone: ---
Assignee: Frans Englich
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-11-09 12:00 UTC by Oliver Hallam
Modified: 2010-03-15 11:55 UTC (History)
0 users

See Also:


Attachments

Description Oliver Hallam 2009-11-09 12:00:53 UTC
K2-OrderbyExprWithout-22 contains the following query:

for $i in (1, 3, 2)
let $c := 3
order by ()
return $i

The expected results are "1 3 2" or "1 2 3", however any permutation should be acceptable.

Indeed in our implementation, when running with optimizations switched off we perform a quicksort on the input tuples and happen to return the result "2 3 1".

It is probably easiest to modify this test with a "stable order by", rather than adding the other 4 permutations.


There are several tests that happen to return the wrong result in our implementation (with optimization disabled) for this reason:

K2-OrderbyExprWithout-22
K2-OrderbyExprWithout-37
K2-OrderbyExprWithout-38
Comment 1 Frans Englich 2010-03-15 09:22:24 UTC
Fix attempted in CVS.
Comment 2 Oliver Hallam 2010-03-15 11:55:23 UTC
This fix seems to have done the trick, so I am marking the bug CLOSED.  Thanks.