Repository navigation
fix: polars 1.8.0 compatibility for list expr and null as_counts - #3
Merged
Merged
Conversation
Agent-Logs-Url: https://github.com/bjhardcastle/polars-vec-ops/sessions/1f688076-4840-45f1-ba5c-93632b4db00c Co-authored-by: bjhardcastle <63425812+bjhardcastle@users.noreply.github.com>
bjhardcastle
marked this pull request as ready for review
April 13, 2026 14:46
bjhardcastle
requested review from
bjhardcastle
and removed request for
bjhardcastle
April 13, 2026 14:47
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two tests fail against polars==1.8.0 (the declared minimum version) due to API differences.
Changes
test_join_between_vec_as_list_expr:pl.col("list_col") + scalarraisesInvalidOperationErrorin polars 1.8.0 — scalar arithmetic doesn't broadcast into list elements until a later release. Replaced with the explicitlist.eval(element() + 1)form, which is equivalent and works across all supported versions.test_join_between_null_vec_row_as_counts/frame.py: In polars 1.8.0,list.len()returns0for null lists instead ofnull. Theas_counts=Truepath was applying.list.len().cast(UInt32)inline in the expression, silently dropping nulls. Moved the conversion out of the plugin expression chain and applied it post-hoc with an explicitwhen/then/otherwisenull guard: