pl.LazyDataFrame.slice has a buggy behaviour with non scalar columns. #18304
Labels
accepted
Ready for implementation
bug
Something isn't working
needs triage
Awaiting prioritization by a maintainer
python
Related to Python Polars
Checks
Reproducible example
Log output
No response
Issue description
pl.LazyDataFrame.slice
returns bugged values for non scalar values by not taking offset into account.Typically, list & struct combination will return the first element without the offset.
Input DF
✅ pl.scan_parquet(file).collect().slice(10, 2)
✅ pl.scan_parquet(file).select(pl.all().slice(10, 2)).collect()
💣 pl.scan_parquet(file).slice(10, 2).collect()
list(struct), list and struct ignores the offset but not int & str
Expected behavior
pl.LazyDataframe.slice
behave similarly:pl.Dataframe.slice
&pl.LazyDataframe.select(pl.all().slice)
Installed versions
The text was updated successfully, but these errors were encountered: