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

Deserializing list-of-null data leads to incorrect results #17230

Open
2 tasks done
stinodego opened this issue Jun 26, 2024 · 0 comments
Open
2 tasks done

Deserializing list-of-null data leads to incorrect results #17230

stinodego opened this issue Jun 26, 2024 · 0 comments
Labels
A-serde Area: seralization and deserialization bug Something isn't working P-medium Priority: medium python Related to Python Polars

Comments

@stinodego
Copy link
Member

Checks

  • I have checked that this issue has not already been reported.
  • I have confirmed this bug exists on the latest version of Polars.

Reproducible example

import io
import polars as pl

df = pl.Series([[]], dtype=pl.List(pl.Null)).to_frame()
ser = df.serialize()
result = pl.DataFrame.deserialize(io.StringIO(ser))
print(result)

Log output

shape: (2, 1)
┌────────────┐
│            │
│ ---        │
│ list[null] │
╞════════════╡
│ []         │
│ []         │
└────────────┘

Issue description

An extra row is added for some reason. Must be related to the 'hack' introduced in #17218

Expected behavior

Preserve the original frame.

Installed versions

main

@stinodego stinodego added bug Something isn't working python Related to Python Polars P-medium Priority: medium A-serde Area: seralization and deserialization labels Jun 26, 2024
@github-project-automation github-project-automation bot moved this to Ready in Backlog Jun 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-serde Area: seralization and deserialization bug Something isn't working P-medium Priority: medium python Related to Python Polars
Projects
Status: Ready
Development

No branches or pull requests

1 participant