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

LazyFrames containing nested List types will cause panic in collect() #16553

Closed
2 tasks done
eitsupi opened this issue May 28, 2024 · 1 comment · Fixed by #16555
Closed
2 tasks done

LazyFrames containing nested List types will cause panic in collect() #16553

eitsupi opened this issue May 28, 2024 · 1 comment · Fixed by #16555
Assignees
Labels
accepted Ready for implementation bug Something isn't working needs triage Awaiting prioritization by a maintainer python Related to Python Polars

Comments

@eitsupi
Copy link
Contributor

eitsupi commented May 28, 2024

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 polars as pl
>>> pl.LazyFrame().select(a=[[[1]]]).collect()

Log output

thread '<unnamed>' panicked at /home/runner/work/polars/polars/crates/polars-core/src/series/mod.rs:149:37:
called `Result::unwrap()` on an `Err` value: InvalidOperation(ErrString("`vec_hash` operation not supported for dtype `list[list[i64]]`"))
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/rstudio/.local/lib/python3.10/site-packages/polars/lazyframe/frame.py", line 1855, in collect
    return wrap_df(ldf.collect(callback))
pyo3_runtime.PanicException: called `Result::unwrap()` on an `Err` value: InvalidOperation(ErrString("`vec_hash` operation not supported for dtype `list[list[i64]]`"))

Issue description

This is in fact a Rust issue, introduced in version 0.40.0. (pola-rs/r-polars#1104 (comment))

I mistakenly thought this was an R bindings issue that did not occur in Python at first, but in fact it also occurs in Python when collecting LazyFrames.

Expected behavior

Should not panic.

Installed versions

>>> pl.show_versions()
--------Version info---------
Polars:               0.20.30
Index type:           UInt32
Platform:             Linux-5.15.146.1-microsoft-standard-WSL2-x86_64-with-glibc2.35
Python:               3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0]

----Optional dependencies----
adbc_driver_manager:  <not installed>
cloudpickle:          <not installed>
connectorx:           <not installed>
deltalake:            <not installed>
fastexcel:            <not installed>
fsspec:               <not installed>
gevent:               <not installed>
hvplot:               <not installed>
matplotlib:           <not installed>
nest_asyncio:         <not installed>
numpy:                <not installed>
openpyxl:             <not installed>
pandas:               <not installed>
pyarrow:              <not installed>
pydantic:             <not installed>
pyiceberg:            <not installed>
pyxlsb:               <not installed>
sqlalchemy:           <not installed>
torch:                <not installed>
xlsx2csv:             <not installed>
xlsxwriter:           <not installed>
@eitsupi eitsupi added bug Something isn't working needs triage Awaiting prioritization by a maintainer python Related to Python Polars labels May 28, 2024
@eitsupi
Copy link
Contributor Author

eitsupi commented May 29, 2024

Thanks for the quick update!

@c-peters c-peters added the accepted Ready for implementation label Jun 3, 2024
@c-peters c-peters added this to Backlog Jun 3, 2024
@c-peters c-peters moved this to Done in Backlog Jun 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepted Ready for implementation bug Something isn't working needs triage Awaiting prioritization by a maintainer python Related to Python Polars
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants