Skip to content
Open
19 changes: 19 additions & 0 deletions datafusion/common/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -860,6 +860,25 @@ config_namespace! {
/// Default: 128 MB
pub max_spill_file_size_bytes: ConfigNonZeroUsize, default = non_zero_usize_default(128 * 1024 * 1024)

/// Enables the memory-limited fallback for `NestedLoopJoinExec` join
/// types that emit unmatched left rows in the final output (LEFT, LEFT
/// SEMI, LEFT ANTI, LEFT MARK, FULL) when the right side has multiple
/// partitions.
///
/// This fallback coordinates per-chunk left state (visited bitmap and
/// probe-thread counter) across all right-side partitions, which
/// assumes every partition runs in the same process. Distributed
/// engines that execute each output partition as an independent task
/// (e.g. Ballista, datafusion-distributed) build a separate coordinator
/// per task and poll only one partition, so the cross-partition
/// counter never reaches zero and the fallback would stall. Such
/// engines should set this to `false`: the coordinated fallback is then
/// disabled for left-emitting multi-partition joins, which instead fail
/// with a resource-exhaustion error under memory pressure rather than
/// deadlocking. Single-partition and non-left-emitting joins are
/// unaffected and always keep the fallback.
pub enable_nlj_coordinated_fallback: bool, default = true

/// Number of files to read in parallel when inferring schema and statistics
pub meta_fetch_concurrency: ConfigNonZeroUsize, default = non_zero_usize_default(32)

Expand Down
Loading
Loading