I mistyped a start clause in a tumbling window expression using "where" instead of "when"
for tumbling window $w in (1 to 20) start at $s where $s mod 3 = 1 return <window>{$w}</window>
see https://fiddle.basex.org/?share=%28%27query%21%27for+tumbling+-*w+in+%7B1+to..., but I didn't get an error but a result
<window>1</window> <window>4</window> <window>7</window> <window>10</window> <window>13</window> <window>16</window> <window>19</window>
Shouldn't that query give a syntax error that "when" is expected instead of "where"?
Or is that a new XQuery 4 feature that the "when" clause can be omitted and the above is kind of parsed/executed as
for tumbling window $w in (1 to 20) start at $s where $s mod 3 = 1 return <window>{$w}</window>
?
Hi Martin,
Or is that a new XQuery 4 feature that the "when" clause can be omitted …
Exactly, window clauses have become more flexible: You can now omit the 'when' condition, as well as the 'start' clause [1].
Hope this helps, Christian
[1] https://qt4cg.org/specifications/xquery-40/xquery-40.html#id-windows
basex-talk@mailman.uni-konstanz.de