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 6244 - [XQuery11UC] windowing use case Q4 Q5 Q9 Q13: results don't match data
Summary: [XQuery11UC] windowing use case Q4 Q5 Q9 Q13: results don't match data
Status: RESOLVED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XQuery 3.0 Use Cases (show other bugs)
Version: Working drafts
Hardware: PC Linux
: P2 normal
Target Milestone: ---
Assignee: Jonathan Robie
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 11763
  Show dependency treegraph
 
Reported: 2008-11-20 00:07 UTC by Xavier Franc
Modified: 2011-01-18 17:28 UTC (History)
2 users (show)

See Also:


Attachments

Description Xavier Franc 2008-11-20 00:07:45 UTC
Given input data:

- results for Q4 should be:
      8 9 17.33333333333333 18.66666666666666

- results for Q5 should be:
      8.88 8.68 12.52 15.6 24.72

- results for Q9 should be:
<result>
    <working-time>
        <person>Anton</person>
        <time>PT9H30M</time>
    </working-time>
    <working-time>
        <person>Clara</person>
        <time>PT5H15M</time>
    </working-time>
    <working-time>
        <person>Barbara</person>
        <time>PT3H</time>
    </working-time>
</result>
</item>

- Q13 cannot work since Clara enters only twice, and on 2 different days
Comment 1 Tim Kraska 2009-02-17 15:51:52 UTC
Q4 and Q5:
Instead of changing the result, I would correct the input sequence to:

<stream>
  <event temp="10" time="1"/>
  <event temp="8" time="2"/>
  <event temp="6" time="3"/>
  <event temp="13" time="4"/>
  <event temp="32" time="5"/>
  <event temp="9" time="6"/>
  <event temp="10" time="7"/>
</stream>

That avoids the floating point representation for Q4. The results for Q4 and Q5 are then correct in the document. 

Q9: The current public draft has as the result:
<result>
  <working-time>
    <person>Barbara</person>
    <time>PT3H</time>
  </working-time>
  <working-time>
    <person>Anton</person>
    <time>PT9H30M</time>
  </working-time>
  <working-time>
    <person>Clara</person>
    <time>PT5H15M</time>
  </working-time>
</result>

As the order for groupby is implementation defined, the result is correct.

Q13: I changed the input data to achieve a result. As a consequence I also needed to change Q7-Q12. 

I'm marking this bug FIXED.  Xavier, if you agree with the solutions, please mark it CLOSED.