Skip to main content

planning_session_context_with_options

Function planning_session_context_with_options 

Source
pub fn planning_session_context_with_options(
    target_partitions: usize,
    spill_join_build_bytes: Option<u64>,
    broadcast_join_bytes: Option<usize>,
) -> SessionContext
Expand description

As planning_session_context_with_join_threshold, with the broadcast (CollectLeft) build-side ceiling supplied instead of read from BROADCAST_JOIN_BYTES_ENV.

None keeps the env-or-default value, which is what production uses.

Pinning it is the only way to reach the cluster’s join shape from a test. The staged path broadcasts any build side under 32 MiB, and every fixture small enough to run in-process is far under that — so a two-table join that hash-shuffles both sides at SF100, and therefore plans a reduce stage with two ShuffleReadExec leaves reading two different upstream stages, collapses in tests to one broadcast join with a single shuffle input. The two shapes exercise different code, and only the small one was ever tested.