News

Polars 2.2 adds disk spilling for streaming joins and SQL writes for Iceberg

In Polars 2.2, inner, left, right and full equality joins can spill partitions on the streaming engine when build-side hash tables exceed the join's memory budget and no output order is requested. Attached Iceberg catalogs gain commands to update rows and compact files.

D
Nov 24, 2026 · 2 min read

The Polars team released Python Polars 2.2.0 on November 24, adding disk spilling for certain streaming joins and SQL writes for tables in attached Apache Iceberg catalogs.

Polars tests disk spilling for inner, left, right and full equality joins on the streaming engine with no requested output order. The engine builds hash tables from one input, called the build side. If those tables exceed the join’s memory budget, Polars groups rows by a hash of the join keys and can move rows from both inputs to disk for partitions whose tables do not fit, then join those partitions one at a time.

Polars says semi and anti joins still build their full hash tables in memory. Joins with maintain_order can spill buffered build-side rows but still build every hash table in memory. A frequently repeated key can leave a single partition whose hash table exceeds the budget.

For tables in attached Iceberg catalogs, the release adds INSERT INTO, INSERT OVERWRITE, UPDATE, DELETE, MERGE INTO and TRUNCATE. It also adds CREATE TABLE ... AS SELECT, PARTITION BY in CREATE TABLE, ALTER TABLE, changes to partitioning and sort order, and commands to create and drop catalog schemas. Users can query earlier snapshots, manage tags and branches, and read metadata tables such as $snapshots.

For maintenance, CALL rewrite_data_files compacts data files and CALL rewrite_manifests rewrites the manifests that track those files. CALL add_files registers existing Parquet files in place.

The new pl.scan_database function reads database tables or SQL query results lazily on the streaming engine. It can pass column selections, eligible filters and row limits to the database. Polars labels the API unstable and distributes its plugin through the database extra.

With the upgrade, str.find and str.find_many now return character positions. The corresponding bin.find and bin.find_many methods return byte offsets.

The release is available on PyPI for Python 3.11 or later.

More news