-
Notifications
You must be signed in to change notification settings - Fork 121
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
feat: track whether expressions change length but don't aggregate, and only allow length-changing expressions if they're followed by aggregations in the lazy API #1828
Conversation
with pytest.raises(LengthChangingExprError): | ||
df.select((nw.col("a").unique() + nw.col("b").unique()).sum()) |
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.
an expression like this is so bizarre that I doubt we'd be cutting off many real use-cases...
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.
Agree! π
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.
Thanks @MarcoGorelli ! This was easier to go through than expected π
I left only a couple of comments but I wonder about other edge cases π€
with pytest.raises(LengthChangingExprError): | ||
df.select((nw.col("a").unique() + nw.col("b").unique()).sum()) |
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.
Agree! π
thanks for your review! |
Getting closer to stable.v2
Similar to #743
What type of PR is this? (check all applicable)
Related issues
Checklist
If you have comments or can explain your changes, please do so below