Skip to content

polars/polars-streaming-order

Rule polars-streaming-order
Pack Polars
Severity info
Fix none, edit by hand
Library versions Polars 2.0 and later

Polars 2.0 made streaming the default for lazy queries. Sort on the keys that define the required order before taking a positional slice.

lf.unpivot(on=["x", "y"]).head(2).collect()
lf.unpivot(on=["x", "y"]).sort("variable", "value").head(2).collect()

The first two unpivoted rows had labels b and c with streaming and b and b with the in-memory engine.

Edit the code using the replacement in the example.

xpd prints this message with the issue. A name that starts with $ stands for code from your file.

Polars 2.0 made streaming the default for lazy queries. Sort on the keys that define the required order before taking a positional slice.

Browse the other rules of the Polars pack.