Repository navigation
Commit d477a2b
authored
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.1 parent a522cd5 commit d477a2b
1 file changed
Lines changed: 4 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1927 | 1927 | | |
1928 | 1928 | | |
1929 | 1929 | | |
1930 | | - | |
1931 | 1930 | | |
1932 | 1931 | | |
1933 | | - | |
| 1932 | + | |
1934 | 1933 | | |
1935 | 1934 | | |
1936 | | - | |
| 1935 | + | |
1937 | 1936 | | |
1938 | 1937 | | |
1939 | 1938 | | |
| |||
2058 | 2057 | | |
2059 | 2058 | | |
2060 | 2059 | | |
2061 | | - | |
| 2060 | + | |
2062 | 2061 | | |
2063 | 2062 | | |
2064 | 2063 | | |
| |||
2087 | 2086 | | |
2088 | 2087 | | |
2089 | 2088 | | |
2090 | | - | |
| 2089 | + | |
2091 | 2090 | | |
2092 | 2091 | | |
2093 | 2092 | | |
| |||
0 commit comments