Open ealders opened 7 months ago
Thank you for the issue report. Can you make a rminimal eproducable example?
Remove all code that doesn't influence and ideally reproduce from an in-memory table. If not, provide the code that generates the file. Currently a file is missing and I cannot reproduce.
I'll work on putting an example together that will compile for you.
parquet_files.tgz I've attached an archive of the parquet files here as well if you want to try with those.
Seems to be happening because overrides_file.parquet
is empty.
Minimal repro:
import polars as pl
pl.LazyFrame(schema=["a", "b", "c"]).cast(pl.String).sink_parquet("empty.parquet")
pl.LazyFrame({"a": ["uno"]}).join(
pl.scan_parquet("empty.parquet"),
on="a"
).collect()
# shape: (0, 3)
# ┌─────┬─────┬─────┐
# │ a ┆ b ┆ c │
# │ --- ┆ --- ┆ --- │
# │ str ┆ str ┆ str │
# ╞═════╪═════╪═════╡
# └─────┴─────┴─────┘
pl.LazyFrame({"a": ["uno"]}).join(
pl.scan_parquet("empty.parquet"),
on="a"
).collect(streaming=True)
# PanicException: called `Option::unwrap()` on a `None` value
Thanks @cmdlineluser!
I would like to take on this please
@ritchie46 @tzehaoo - Have either one of you had a chance to look deeper into this? Is it something to do with the updated parquet file handling library that was introduced?
Checks
Reproducible example
Log output
Issue description
The above code works flawlessly in Polars v0.34.2. When working to upgrade our Polars version to the recent v0.38.1 version I noticed this issue. So I went back to upgrade a version at a time to see when this issue got introduced. It looks like this got introduced in v0.35.4 when changes were made to joining. Particularly, this left join is what is causing the issue that uses multiple columns...
if I comment that line out it will sink appropriately. One thing to note is the parquet that is being left joined is empty most of the time or has only a few rows in it.
Expected behavior
Would expect this work correctly as in v0.34.2.
Installed versions