where instead of when in window start clause
MHMartin Honnen17 Feb 2025 12:33 # 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>
<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>
⚡Generated with XQuery