You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
importpolarsasplpl.read_ndjson(b"null")
Log output
thread '<unnamed>' panicked at crates/polars-arrow/src/array/struct_/mod.rs:258:37:
called `Result::unwrap()` on an `Err` value: ComputeError(ErrString("Struct array must be created with a DataType whose physical type is Struct"))
Issue description
read_json raises a ComputeError.
pl.read_json(b"null")
# ComputeError: can only deserialize json objects
orjson returns None from orjson.loads(b"null") so should we return a (0,0) df instead of raising? I don't have a strong opinion, raising makes sense too since a 0,0 df is arguably not the same as None.
Semi-related, should pl.DataFrame().item() return None instead of raising?
Checks
Reproducible example
Log output
Issue description
read_json
raises a ComputeError.Expected behavior
No panic.
Installed versions
The text was updated successfully, but these errors were encountered: