-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: rolling_* aggs were behaving as if they return scalars in group-by #15657
fix: rolling_* aggs were behaving as if they return scalars in group-by #15657
Conversation
CodSpeed Performance ReportMerging #15657 will not alter performanceComparing Summary
|
@@ -1208,7 +1208,7 @@ impl Expr { | |||
self.apply_many_private( | |||
FunctionExpr::RollingExpr(rolling_function_by(options)), | |||
&[col(&name)], | |||
true, | |||
false, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ai, good catch. That took a long time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just wondering what's the principle here, it seems to be the same behavior for reduce/fold
(return_scalars=True).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rolling functions return something which is the same length as the input, so I don't think they should ever return a scalar
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeap, I see. But IIRC, the output of fold/reduce should also be consistent with the length of the input.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah thanks - will take a look, have made a note-to-self
closes #15656