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 5233 - K2-OrderbyExprWithout-19
Summary: K2-OrderbyExprWithout-19
Status: RESOLVED FIXED
Alias: None
Product: XML Query Test Suite
Classification: Unclassified
Component: XML Query Test Suite (show other bugs)
Version: unspecified
Hardware: PC Windows XP
: 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: 2007-10-28 09:35 UTC by Michael Kay
Modified: 2007-10-30 12:17 UTC (History)
0 users

See Also:


Attachments

Description Michael Kay 2007-10-28 09:35:30 UTC
This test K2-OrderbyExprWithout-19 reads:

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

and is supposedly invalid because the sort key is not a singleton. However, I think an optimizer is allowed to avoid evaluating the sort key when there is only one tuple in the tuple stream. I'm not sure I can find an explicit statement to that effect, but it's very much in the spirit of the rule that you never need to do extra work at runtime whose only purpose is to detect errors.
Comment 1 Michael Kay 2007-10-28 09:41:14 UTC
Also affects

    K2-OrderbyExprWithout-23
    K2-OrderbyExprWithout-25
    K2-OrderbyExprWithout-26
    K2-OrderbyExprWithout-27
    K2-OrderbyExprWithout-28
    K2-OrderbyExprWithout-31
    K2-OrderbyExprWithout-32

Comment 2 Frans Englich 2007-10-30 12:17:28 UTC
That's my interpretation too. Should be fixed in CVS.