Skip to content

Conversation

rstam
Copy link
Contributor

@rstam rstam commented May 25, 2022

No description provided.

@rstam rstam requested a review from JamesKovacs May 25, 2022 20:46
Copy link
Contributor

@JamesKovacs JamesKovacs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Nice clean refactoring that will make it easier to extend $setWindowFields in the future.

return new BsonDocument
{
{ _operator.Render(), new BsonArray { _arg1.Render(), _arg2.Render() } },
{ "window", _window?.Render(), _window != null }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thinking about it, this looks more efficient than our usual formulation using a conditionally executed lambda.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants