Skip to content
Opensource internals
  • Posts

Posts

All posts published on this site.

Everything published here, newest first.

How DataFusion Decorrelates a Correlated Subquery Into a Join (and Pays for It With a CASE Expression)

Oct 21, 2026 9 min read Jay Hubbert

DataFusion’s decorrelator pulls a correlated filter out of a subquery and turns it into a join predicate, adding a __always_true indicator column so the empty-set semantics of …

DatafusionOptimizerSubqueriesPerformanceInternals

Read more →

Operators declare what they need: how DataFusion's planner inserts the shuffle for you

Oct 21, 2026 13 min read Jay Hubbert

Instead of hard-coding shuffles, each ExecutionPlan states the distribution it needs from its children; a single optimizer rule turns unmet requirements into RepartitionExec nodes.

DatafusionExecutionPerformanceInternals

Read more →

Sort In Place, or Merge? How DataFusion Decides Between One Big Sort and a Fan-In of Sorted Runs

Oct 21, 2026 7 min read Jay Hubbert

DataFusion’s external sorter has two modes: sort the whole buffered input in one concatenated batch when it is small, and otherwise sort per-batch runs and merge them — coalescing …

DatafusionSortingPerformanceInternalsMemory

Read more →

DataFusion's Constant Folding Trick: Evaluate the Expression Against a Dummy Row of NULLs

Oct 21, 2026 10 min read Jay Hubbert

DataFusion constant-folds expressions by running them against a one-row dummy batch of NULLs, and guards the trick with checks for volatility, leaf nodes, and regexes that would …

DatafusionOptimizerConstant foldingPerformanceInternals

Read more →

Top-K without a sort: how DataFusion keeps a bounded heap of the k smallest rows

Oct 21, 2026 17 min read Jay Hubbert

Instead of sorting N rows to keep k, DataFusion encodes sort keys in Arrow’s row format, keeps the k best rows in a binary heap, and publishes a dynamic filter so the scan below …

DatafusionExecutionPerformanceInternals

Read more →

← Newer Page 40 of 83 Older →

© 2026 Jay Hubbert · Built with Hugo 0.168.0

RSS ·