[SERVER-56450] Allow range-based windows with descending sortBy Created: 28/Apr/21  Updated: 06/Dec/22

Status: Backlog
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: New Feature Priority: Major - P3
Reporter: Sam Mercier Assignee: Backlog - Query Optimization
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to SERVER-56581 Flip window-function sortBy and bound... Backlog
Assigned Teams:
Query Optimization
Participants:

 Comments   
Comment by Charlie Swanson [ 29/Apr/21 ]

nicholas.zolnierz can you add this as an open question somewhere that we'll remember to discuss before project closeout?

Comment by Sam Mercier [ 28/Apr/21 ]

We've disallowed range-based windows because of the ambiguity as to whether to allow ranges of [3,1] or [1,3] as non-empty windows. Giving an error message to the user to allow them to specify a proper non-empty window should be a way of alleviating this ambiguity of semantic meaning.

Another possible solution could be to change the syntax of range specification to alleviate this ambiguity entirely changing the range specification from [3,1] to

{upper: 3, lower: 1}

or something similar.

Generated at Thu Feb 08 05:39:17 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.