-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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: Preserve NULLs for is_not_nan
#15889
Conversation
CodSpeed Performance ReportMerging #15889 will not alter performanceComparing Summary
|
Thank you @nameexhaustion! |
@@ -966,7 +966,7 @@ impl Expr { | |||
// we take the not branch so that self is truthy value of `when -> then -> otherwise` | |||
// and that ensure we keep the name of `self` | |||
|
|||
when(self.clone().is_not_nan()) | |||
when(self.clone().is_not_nan().or(self.clone().is_null())) |
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.
I think we can save a negate + allocation
if we say & ca.is_not_null()
. In that case we can use the validity mask directly and convert that to boolean array.
not sure what's going on with code coverage but I'll give it one more try libunwind: stepWithCompactEncoding - invalid compact unwind encoding warning: /Users/runner/work/polars/polars/target/polars-41273-14359842420759467167_2.profraw: invalid instrumentation profile data (file header is corrupt)
error: no profile can be merged
error: failed to merge profile data: process didn't exit successfully: `/Users/runner/.rustup/toolchains/nightly-[20](https://github.com/pola-rs/polars/actions/runs/8841603756/job/24278957655?pr=15889#step:13:21)24-04-15-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/bin/llvm-profdata merge -sparse -f /Users/runner/work/polars/polars/target/polars-profraw-list -o /Users/runner/work/polars/polars/target/polars.profdata` (exit status: 1) |
Yeah, it is broken on every PR. :/ |
Fixes #15862.
As an aside, float-specific functions on non-floats also currently don't preserve NULLs:
Non-float