Skip to content
Opensource internals
  • Posts

Datafusion

DataFusion's Spillable Shuffle: Writing Batches to Disk Without Reordering Them

Oct 21, 2026 14 min read Jay Hubbert

The shuffle spills selectively, not wholesale: one batch at a time, into a per-(input,output) FIFO pool, with a marker batch telling the reader to switch to disk.

DatafusionMemoryPerformanceInternals

Read more →

How DataFusion Spills a Hash Aggregation to Disk Without Breaking GROUP BY

Oct 21, 2026 12 min read Jay Hubbert

Spilling a GROUP BY means re-implementing its semantics on disk: sort the state runs, merge them with bounded memory, then replay through a clustered aggregate.

DatafusionMemoryPerformanceInternals

Read more →

Partial Sort: How DataFusion Sorts a Stream That Is Already Sorted by a Prefix

Oct 21, 2026 6 min read Jay Hubbert

DataFusion’s PartialSortExec exploits an input that is already sorted by a prefix of the required ordering: it buffers one prefix group at a time, sorts just the suffix, and emits …

DatafusionSortingStreamingPerformanceInternals

Read more →

One take, N slices: how DataFusion's RepartitionExec splits a batch across shuffle partitions

Oct 21, 2026 12 min read Jay Hubbert

The repartition operator hashes each row once, concatenates per-partition row indices, performs exactly one take over the whole batch, and then slices the reordered result into …

DatafusionExecutionPerformanceInternals

Read more →

DataFusion Skips the Hash Table When the Input Is Already Sorted by the Group Key

Oct 21, 2026 15 min read Jay Hubbert

When the input is already clustered by the grouping key, DataFusion detects it from the input’s ordering properties, tracks group completion with a tiny state machine, and interns …

DatafusionAggregationPerformanceInternals

Read more →

← Newer Page 4 of 15 Older →

© 2026 Jay Hubbert · Built with Hugo 0.168.0

RSS ·