Details
-
Improvement
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
1.16.0
-
None
-
None
Description
When creating a ticket CALCITE-3402 (to ask for improve the window functions), it's appears that the documentation of drill seems not up to date
https://drill.apache.org/docs/aggregate-window-functions/
frame_clause
If an ORDER BY clause is used for an aggregate function, an explicit frame clause is required. The frame clause refines the set of rows in a function's window, including or excluding sets of rows within the ordered result. The frame clause consists of the ROWS or RANGE keyword and associated specifiers.
But it's currently (1.16) possible to write ORDER BY clause in window function without specify an explicit RANGE clause.
In this case, an implicit frame clause is used.
And normally the default/implicit framing option is RANGE UNBOUNDED PRECEDING, which is the same as {{RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW (and should perhaps also be more explicitly specified) }}