-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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(rust, python)!: consistently return list of date/datetime from lazy date_range #8513
feat(rust, python)!: consistently return list of date/datetime from lazy date_range #8513
Conversation
1089221
to
0ffb2b4
Compare
I think we should also take this breaking opportunity to change the default Other than that I agree with these changes. Having a dynamic output type dependent on data size was clearly bad design. |
Yeap, that's best it seems. |
20d0bc7
to
9fb7424
Compare
@@ -727,6 +754,7 @@ def test_time_range_lit() -> None: | |||
name="tm", | |||
) | |||
) | |||
tm = tm.select(pl.col("tm").explode()) |
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.
here start
is an expression, so it behaves like in the lazy manner
polars/py-polars/polars/functions/eager.py
Lines 657 to 661 in 4f574bc
if ( | |
not eager | |
or isinstance(start, (str, pl.Expr)) | |
or isinstance(end, (str, pl.Expr)) | |
): |
Thanks. Good that we have a consistent output type now. |
1 similar comment
Thanks. Good that we have a consistent output type now. |
closes #7110
This simplifies the logic, but would be a breaking change, so if accepted, might be better to wait for 0.18 or 1.0?
It also simplifies the logic on the user side (I think) - in all the test cases I found where this is used, it removes an unnecessary
.implode
callIf reviewing, this is much easier if ignoring whitespace: https://github.com/pola-rs/polars/pull/8513/files?w=1