You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@datafusion.apache.org by gi...@apache.org on 2026/09/19 07:00:34 UTC
(datafusion) branch gh-readonly-queue/main/pr-25492-a522cd5bcedabd6238a0462b881a7ef4cb5c6f66 created (now d477a2b038)
This is an automated email from the ASF dual-hosted git repository.
github-merge-queue[bot] pushed a change to branch gh-readonly-queue/main/pr-25492-a522cd5bcedabd6238a0462b881a7ef4cb5c6f66
in repository https://gitbox.apache.org/repos/asf/datafusion.git
at d477a2b038 fix: shrink NLJ load outcome to satisfy Clippy (#25492)
This branch includes the following new commits:
new d477a2b038 fix: shrink NLJ load outcome to satisfy Clippy (#25492)
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datafusion.apache.org
For additional commands, e-mail: commits-help@datafusion.apache.org
(datafusion) 01/01: fix: shrink NLJ load outcome to satisfy Clippy (#25492)
Posted by gi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
github-merge-queue[bot] pushed a commit to branch gh-readonly-queue/main/pr-25492-a522cd5bcedabd6238a0462b881a7ef4cb5c6f66
in repository https://gitbox.apache.org/repos/asf/datafusion.git
commit d477a2b038730647bef258cb98e58978b0c74699
Author: Xuanwo <gi...@xuanwo.io>
AuthorDate: Sat Sep 19 07:00:11 2026 +0000
fix: shrink NLJ load outcome to satisfy Clippy (#25492)
## Which issue does this PR close?
Minor follow-up to #25371.
## Rationale for this change
Workspace Clippy fails on main
(`a522cd5bcedabd6238a0462b881a7ef4cb5c6f66`) with
`clippy::large_enum_variant` in `LoadOutcome`. After the segmented batch
layout change, `Chunk` contains at least 201 bytes while `Empty` carries
no data.
Reproduced on aarch64 macOS with Rust 1.98.1:
```sh
cargo clippy --workspace --all-targets --all-features -- -D warnings
```
## What changes are included in this PR?
Store `Arc<JoinLeftData>` in `LoadOutcome::Chunk`. Construct the Arc
when loading completes and reuse it when publishing the chunk. The
successful path already allocated this Arc during publication, so this
reduces the enum size without adding another allocation or changing the
shared chunk ownership.
## What is the testing strategy for this PR?
The Clippy command above fails before the change and passes after it.
Existing NLJ tests cover coordinated spilling, cancellation, and memory
reservation lifetimes; no new behavior is introduced.
Validation:
- `cargo fmt --all`
- `cargo clippy --workspace --all-targets --all-features -- -D warnings`
- `cargo test -p datafusion-physical-plan --lib joins::nested_loop_join`
(90 passed)
- `cargo test --test sqllogictests -- nested_loop_join_spill` (passed)
- `uv run ./dev/rust_lint.sh` (full suite passed)
## Are there any user-facing changes?
No query or public API changes. This restores the workspace Clippy
check.
---
datafusion/physical-plan/src/joins/nested_loop_join.rs | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/datafusion/physical-plan/src/joins/nested_loop_join.rs b/datafusion/physical-plan/src/joins/nested_loop_join.rs
index de145f837b..82c91205d0 100644
--- a/datafusion/physical-plan/src/joins/nested_loop_join.rs
+++ b/datafusion/physical-plan/src/joins/nested_loop_join.rs
@@ -1927,13 +1927,12 @@ impl FallbackCoordinator {
if is_last {
inner.left_exhausted = true;
}
- let arc_data = Arc::new(data);
inner.current = Some(CurrentChunk {
chunk_index,
- data: Arc::clone(&arc_data),
+ data: Arc::clone(&data),
is_last,
});
- Some(Ok(Some((arc_data, is_last))))
+ Some(Ok(Some((data, is_last))))
}
Ok(LoadOutcome::Empty) => {
inner.left_exhausted = true;
@@ -2058,7 +2057,7 @@ impl FallbackCoordinator {
);
Ok(LoadOutcome::Chunk {
- data,
+ data: Arc::new(data),
is_last: left_stream_exhausted,
carryover: next_carryover,
})
@@ -2087,7 +2086,7 @@ enum Decision<'a> {
enum LoadOutcome {
Chunk {
- data: JoinLeftData,
+ data: Arc<JoinLeftData>,
is_last: bool,
carryover: Option<RecordBatch>,
},
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datafusion.apache.org
For additional commands, e-mail: commits-help@datafusion.apache.org