Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Not A Problem
-
2.1.0
-
None
-
None
Description
Currently sum() over (partition by a) without order by is defaulted windowing to RangeBoundarySpec while sum() over (partition by a order by c) is defaulted to ValueBoundarySpec. It's not consistent and the user gets confused of the switch from "rows between" to "range between" by adding "order by c" clause.
From the comment
/* * - A Window Frame that has only the /start/boundary, then it is interpreted as: BETWEEN <start boundary> AND CURRENT ROW * - A Window Specification with an Order Specification and no Window * Frame is interpreted as: ROW BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW * - A Window Specification with no Order and no Window Frame is interpreted as: ROW BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING */
We intended to set as "row between" (RangeBoundarySpec), not "range between" (ValueBoundarySpec).