<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>6244</bug_id>
          
          <creation_ts>2008-11-20 00:07:45 +0000</creation_ts>
          <short_desc>[XQuery11UC] windowing use case Q4 Q5 Q9 Q13: results don&apos;t match data</short_desc>
          <delta_ts>2011-01-18 17:28:30 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>XPath / XQuery / XSLT</product>
          <component>XQuery 3.0 Use Cases</component>
          <version>Working drafts</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>11763</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Xavier Franc">xfranc</reporter>
          <assigned_to name="Jonathan Robie">jonathan.robie</assigned_to>
          <cc>jim.melton</cc>
    
    <cc>jonathan.robie</cc>
          
          <qa_contact name="Mailing list for public feedback on specs from XSL and XML Query WGs">public-qt-comments</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>22484</commentid>
    <comment_count>0</comment_count>
    <who name="Xavier Franc">xfranc</who>
    <bug_when>2008-11-20 00:07:45 +0000</bug_when>
    <thetext>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:
&lt;result&gt;
    &lt;working-time&gt;
        &lt;person&gt;Anton&lt;/person&gt;
        &lt;time&gt;PT9H30M&lt;/time&gt;
    &lt;/working-time&gt;
    &lt;working-time&gt;
        &lt;person&gt;Clara&lt;/person&gt;
        &lt;time&gt;PT5H15M&lt;/time&gt;
    &lt;/working-time&gt;
    &lt;working-time&gt;
        &lt;person&gt;Barbara&lt;/person&gt;
        &lt;time&gt;PT3H&lt;/time&gt;
    &lt;/working-time&gt;
&lt;/result&gt;
&lt;/item&gt;

- Q13 cannot work since Clara enters only twice, and on 2 different days</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>23798</commentid>
    <comment_count>1</comment_count>
    <who name="Tim Kraska">tim</who>
    <bug_when>2009-02-17 15:51:52 +0000</bug_when>
    <thetext>Q4 and Q5:
Instead of changing the result, I would correct the input sequence to:

&lt;stream&gt;
  &lt;event temp=&quot;10&quot; time=&quot;1&quot;/&gt;
  &lt;event temp=&quot;8&quot; time=&quot;2&quot;/&gt;
  &lt;event temp=&quot;6&quot; time=&quot;3&quot;/&gt;
  &lt;event temp=&quot;13&quot; time=&quot;4&quot;/&gt;
  &lt;event temp=&quot;32&quot; time=&quot;5&quot;/&gt;
  &lt;event temp=&quot;9&quot; time=&quot;6&quot;/&gt;
  &lt;event temp=&quot;10&quot; time=&quot;7&quot;/&gt;
&lt;/stream&gt;

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:
&lt;result&gt;
  &lt;working-time&gt;
    &lt;person&gt;Barbara&lt;/person&gt;
    &lt;time&gt;PT3H&lt;/time&gt;
  &lt;/working-time&gt;
  &lt;working-time&gt;
    &lt;person&gt;Anton&lt;/person&gt;
    &lt;time&gt;PT9H30M&lt;/time&gt;
  &lt;/working-time&gt;
  &lt;working-time&gt;
    &lt;person&gt;Clara&lt;/person&gt;
    &lt;time&gt;PT5H15M&lt;/time&gt;
  &lt;/working-time&gt;
&lt;/result&gt;

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&apos;m marking this bug FIXED.  Xavier, if you agree with the solutions, please mark it CLOSED. 

</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>