[CSHARP-4186] Refactor AstSetWindowFieldsWindowExpressions into multiple subclasses Created: 24/May/22  Updated: 27/May/22  Resolved: 27/May/22

Status: Closed
Project: C# Driver
Component/s: LINQ3
Affects Version/s: None
Fix Version/s: 2.16.0

Type: Task Priority: Unknown
Reporter: Robert Stam Assignee: Robert Stam
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by CSHARP-3529 Support $topN and similar accumulator... Closed

 Description   

Right now the single AstSetWindowFieldsWindowExpression class represents all possible SetWindowFields accumulators.

It does this by using an operator and a variable number of arguments.

But this can be error prone because the caller of the constructor needs to make sure to pass the arguments in the right order, with no parameter names to provide clues.

It also makes the Render methods overly complicated, because the variable number of arguments are rendered differently depending on the operator.

It would probably be helpful to have a class hierarchy instead of a single class for the SetWindowField accumulators.

 


Generated at Wed Feb 07 21:47:29 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.