Closed
Description
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
import io
dfs = [pl.DataFrame({"a": 1, "b": 1}), pl.DataFrame({"a": 1, "c": 1})]
files = []
for df in dfs:
f = io.BytesIO()
df.write_parquet(f)
files.append(f)
q = pl.scan_parquet(files, allow_missing_columns=True)
q.select(pl.all()).collect()
Log output
Issue description
The check is incorrectly disabled when we see a projection.
This needs an extra_columns
parameter to fix (see #22219)
Expected behavior
The provided example should raise polars.exceptions.SchemaError: extra column in file outside of expected schema: c
Installed versions
1.27