Polars Aggregates Faster When the Keys Are Already Sorted
The eager group-by checks the column’s IsSorted flag before it builds anything. If the keys are sorted, the groups are contiguous row ranges, produced by a run-length scan that can …
The eager group-by checks the column’s IsSorted flag before it builds anything. If the keys are sorted, the groups are contiguous row ranges, produced by a run-length scan that can …
Grouping in Polars is a separate stage: keys are encoded (single key, key rows, row encoding, or binview), hashed into group ids by a Grouper, and every aggregation expression then …
Instead of running the plan top to bottom, the streaming engine runs it in phases and picks the next node by memory pressure, with a spill-to-disk fallback and a min-cut that …
Polars lowers the user-facing Expr tree into a flat Arena of nodes addressed by integer Node handles, which the physical planner walks to build Arc operators.
The Parquet sink does not write morsels. It resizes them into row groups of a target size, encodes and compresses those row groups in parallel across columns, and hands the …