Skip to content
Opensource internals
  • Posts

Polars

Polars Hash-Shuffles Rows Between Streaming Stages

Oct 21, 2026 19 min read Jay Hubbert

Rows are partitioned by hash(key) into N buckets, so equal keys always land in the same bucket. Each bucket is aggregated or joined independently, which is a shuffle instead of a …

PolarsInternalsStreamingGroup byJoinsPerformance

Read more →

Polars' New Streaming Engine Works in Morsels

Oct 21, 2026 14 min read Jay Hubbert

The streaming engine never moves a whole DataFrame between operators. It moves a Morsel — a fixed-size slice of rows with a sequence number — over rendezvous channels, and a …

PolarsInternalsStreamingConcurrencyMemory

Read more →

Polars Kills Duplicate Subplans by Fingerprinting Them

Oct 21, 2026 14 min read Jay Hubbert

Polars does not compare subtrees with a recursive equality check. It hashes each plan node together with the canonical ids of its children, interns the result in a hash table of …

PolarsInternalsOptimizerLazyPerformance

Read more →

Polars Simplifies the Expression Tree Before It Runs Anything

Oct 21, 2026 14 min read Jay Hubbert

Simplification is not a separate optimizer pass in Polars but a rewrite rule that runs interleaved with type coercion during conversion, using a context flag that tells the rule …

PolarsInternalsOptimizerLazy

Read more →

Polars Pushes Predicates Into the Parquet Scanner

Oct 21, 2026 13 min read Jay Hubbert

The filter is not a special case in the Parquet reader. Polars compiles the same expression tree a second time into a predicate over a synthetic frame of col_min / col_max / col_nc …

PolarsInternalsOptimizerParquetPerformance

Read more →

← Newer Page 5 of 7 Older →

© 2026 Jay Hubbert · Built with Hugo 0.168.0

RSS ·