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 15539 - [QT3] alternate result for group-010
Summary: [QT3] alternate result for group-010
Status: CLOSED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XQuery 3 & XPath 3 Test Suite (show other bugs)
Version: Last Call drafts
Hardware: PC Windows XP
: P2 normal
Target Milestone: ---
Assignee: Benjamin Nguyen
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-12 22:23 UTC by Andrew Eisenberg
Modified: 2012-01-12 22:26 UTC (History)
1 user (show)

See Also:


Attachments

Description Andrew Eisenberg 2012-01-12 22:23:53 UTC
The query in group-010 is:

for $x in //employee 
let $key := if ($x/@gender='male') then number('NaN') else 42 
group by $key 
order by $key 
return <group key="{$key}" count="{count($x)}"/> 


I believe that two results should be accepted, one with the NaN group before the non-NaN group, and one with the non-NaN group before the NaN group.

The order by by clause is a no-op here, because an implementation may chose either empty-least or empty-greatest for the default order for empty sequences. This choice determines whether the NaN group appears first or last.
Comment 1 Andrew Eisenberg 2012-01-12 22:26:11 UTC
I have removed the order by clause from the query and allowed the two results that I described.