Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions datafusion/common/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1031,6 +1031,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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the SemVer concern raised by the bot still needs to be addressed. ExecutionOptions is public and can be constructed exhaustively, so adding this public field breaks downstream struct literals. cargo-semver-checks reports constructible_struct_adds_field for this field.

Could we use a configuration mechanism that does not add a field to the publicly constructible struct? Otherwise, if this API break is intentional, I think it needs to be explicitly approved and targeted for the appropriate major-version change.


/// 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