-
Notifications
You must be signed in to change notification settings - Fork 36
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
Bump rust-polars to 0.43.1 #1230
Conversation
There seem to be quite a few critical bugs in this version, so perhaps the next release will be made soon. |
This update adds a broadcast rule so that Series of length 1 are no longer automatically broadcast. (#835 (comment)) |
@eitsupi there are still a few errors in Rust in Also, it would be great if you could double check my changes in Rust as I'm almost sure some things are not idiomatic. After that I can take care of the R side.
I guess so, let's see how it is when the remaining Rust errors are fixed. |
I fixed it so that it would compile successfully. All the fixes seem to be due to the introduction of PlSmallStr.
I think you did an excellent job. There were no areas that I felt particularly uncomfortable with. Personally, I would prefer to use the |
Hmm, it seems that polars-parquet fails to compile for the arm64 targets (macOS/Linux) when the nightly feature is enabled. |
Does this seem to be the only one giving a broadcast error in the test log? r-polars/tests/testthat/test-lazy_functions.R Lines 493 to 496 in 77bba3c
In fact, this is not a big deal, since Python's DataFrame constructor also fails unless all the data lengths match; the Lines 21 to 25 in 28eae28
|
Thanks for the help! I'll explore the test failures to see what comes from this broadcasting change. I don't have a linux or macos machine to test those compilation failures now but let's see if it comes up in the issue tracker upstream. |
Pleasantly surprised by the few number of fixes to do, there are just the two failures you mentioned about broadcasting. Those do not always appear, for example this works: pl$DataFrame(
start = c("2022-01-01", "2022-01-02"),
end = c("2022-01-03")
) while this fails: pl$DataFrame(
start = c("2022-01-01", "2022-01-02"),
end = as.Date(c("2022-01-03"))
) I'll try to take a look in the next few days, unless you want to take care of that first. |
Perhaps it might be here, and in the match arm that calls r-polars/src/rust/src/lazy/dsl.rs Lines 76 to 176 in 77bba3c
This is a target to be completely rewritten in the |
b680408
to
0febcba
Compare
Compiling failure on macOS is due to rust-lang/rust#129887, which should have been fixed in more recent nightly versions. I tried bumping the toolchain to 2024-09-19 to see if it works |
@eitsupi I didn't add much since last time but can you check the fix for literal values? |
(_, rlen) if robj_inherits(&robj, ["POSIXct", "PTime", "Date"]) => { | ||
if rlen == 1 { | ||
Ok(to_series_then_lit(robj)?.first()) | ||
} else { | ||
to_series_then_lit(robj) | ||
} |
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.
In my opinion this is not enough, because the case of length 1 should be handled for all R objects, not only for POSIXct.
So the length determination must be done after the converted Series in the to_series_then_lit
function, not here.
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.
Let's merge them as they are now, since literal values are not likely to be used that often and I think a rewrite is needed to fundamentally solve the problem.
Not going to address that very soon, just to ensure we do the bump on this branch
Changelog for 0.43.0: https://github.com/pola-rs/polars/releases/tag/rs-0.43.0
Changelog for 0.43.1: https://github.com/pola-rs/polars/releases/tag/rs-0.43.1