Skip to content
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: nested null data type Series treated as an empty Series #1023

Merged
merged 5 commits into from
Apr 11, 2024

Conversation

eitsupi
Copy link
Collaborator

@eitsupi eitsupi commented Apr 11, 2024

A follow up for #1021

This change will allow for more proper conversion from lists that contain NULLs or empty lists.

For example, in 0.15.1, a strange error occurs in the following case:

> as_polars_series(list(list(), list(1, 2)))
Error: Execution halted with the following contexts
   0: In R: in pl$Series():
   0: During function call [as_polars_series(list(list(), list(1, 2)))]
   1: Encountered the following error in Rust-Polars:
        data types don't match: When building series from R list; some parsed sub-elements did not match: One element was f64 and another was list[f64]

@eitsupi
Copy link
Collaborator Author

eitsupi commented Apr 11, 2024

Updating the NEWS file will cause conflicts with #1022, so I want to update later.

Copy link
Collaborator

@etiennebacher etiennebacher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks

@eitsupi eitsupi changed the title fix: nested null series treated as an empty series fix: nested null Series treated as an empty Series Apr 11, 2024
@eitsupi eitsupi changed the title fix: nested null Series treated as an empty Series fix: nested null data type Series treated as an empty Series Apr 11, 2024
@eitsupi eitsupi merged commit de1fd05 into main Apr 11, 2024
33 checks passed
@eitsupi eitsupi deleted the datatype-null-handling branch April 11, 2024 17:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants