This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
The results I get from this test are 8.88 8.68 12.52 15.6 24.72, which I believe to be correct. For example, the third window is (6, 13, 33). The smoothed average is therefore (0.2*33) + (0.8*(0.2*13 + 0.8*6)) which is 12.52, not 12.32 as given. (Note, the error appears to be present in the published use cases)
I have confirmed the proposed result with Zorba and updated the test's expected result. I'm changing the component of the bug to "XQuery 3.0 Use Cases" because the expected results given in the use cases document also needs to be changed.
Fixed in the internal Working Draft of the XQuery 3.0 Use Cases document.
The resolution for Bug #11763 was to change the source document for Q5. With this modified source document, the result of the query should continue to be: 8.88 8.68 12.32 15.24 23.92 For example, the third window is (6, 13, 32). The smoothed average is therefore (0.2*32) + (0.8*(0.2*13 + 0.8*6)) which is 12.32.
Fixed now: <quote> Solution in XQuery: declare variable $timesequence := fn:doc("temp_events.xml"); let $SMOOTH_CONST := 0.2 for sliding window $w in $timesequence/stream/event start at $s_pos when true() only end at $e_pos when $e_pos - $s_pos eq 2 return round-half-to-even($SMOOTH_CONST * data($w[3]/@temp) + (1 - $SMOOTH_CONST) * ( $SMOOTH_CONST * data($w[2]/@temp) + (1 - $SMOOTH_CONST) * data($w[1]/@temp) ), 2) Expected Result: 8.88 8.68 12.32 15.24 23.92 </quote>