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: Cast empty lists and lists of only nulls without an inner dtype #15525

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

petrosbar
Copy link
Contributor

Fixes #15523

When building a Series of lists without specifying an inner dtype, if there's any empty list, construction will panic. The reason is that in AnyValue::List(b), if b is empty, its dtype is Null regardless of the dtype of the other lists.

@github-actions github-actions bot added fix Bug fix python Related to Python Polars rust Related to Rust Polars labels Apr 7, 2024
Copy link

codecov bot commented Apr 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 80.40%. Comparing base (0c37ead) to head (01064c3).

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #15525   +/-   ##
=======================================
  Coverage   80.39%   80.40%           
=======================================
  Files        1264     1264           
  Lines      165421   165434   +13     
=======================================
+ Hits       132994   133019   +25     
+ Misses      32427    32415   -12     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

codspeed-hq bot commented Apr 11, 2024

CodSpeed Performance Report

Merging #15525 will improve performances by 16.33%

Comparing petrosbar:anyvalue-empty-list (01064c3) with main (d11da5e)

Summary

⚡ 1 improvements
✅ 20 untouched benchmarks

Benchmarks breakdown

Benchmark main petrosbar:anyvalue-empty-list Change
test_windows_not_cached 3.6 s 3.1 s +16.33%

@petrosbar petrosbar changed the title fix: Cast empty lists in Series of lists without an inner dtype fix: Cast empty lists and lists of only nulls without an inner dtype Apr 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix Bug fix python Related to Python Polars rust Related to Rust Polars
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Panic when building a Series of lists without an inner dtype
2 participants