Skip to content

Memory pointer from external source (e.g, FFI) is not aligned for empty list[str] #7549

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

Open
ion-elgreco opened this issue May 25, 2025 · 0 comments
Labels

Comments

@ion-elgreco
Copy link

Describe the bug
Can't consume arrow data with empty list[str] over FFI

To Reproduce

import polars as pl
from arro3.core import Table
df = pl.DataFrame(
    {
        "bar": [[]],
    }, schema={"bar": pl.List(pl.String)}
)

Table(df)

Expected behavior
Pyarrow seems to be able to consume this empty list[str] fine,

import polars as pl
import pyarrow as pa
df = pl.DataFrame(
    {
        "bar": [[]],
    }, schema={"bar": pl.List(pl.String)}
)

pa.table(df)

Additional context
Created also issue in polars repo: pola-rs/polars#22935, since it's not clear to me where the issue lies, wether it's polars buffers being misaligned or arrow-rs incorrectly identifying it because pyarrow seems to be able to consume it fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant