You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit e7545a0
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: PR_REVIEW_01.md
+11-5Lines changed: 11 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,20 +10,26 @@ author: lyne7-sc
10
10
- Cached filter-column projection and original-row mappings preserve output payloads and spill bitmap coordinates; Cartesian filter evaluation is extracted into a shared helper.
11
11
- Added bitmap/early-stop unit tests, compaction and spill/replay SQLLogicTests, and six SQL benchmarks covering no matches, staged matches, repeated matches, and final-probe copying.
12
12
13
-
Scope: cumulative PR changes in `b9fb06973b^..9d19d30a38`, accounting for both main merges. Reviewed final PR delta against `9d19d30a38^2`; upstream-only changes excluded. No UNPICK commits reviewed. Checkout differs from reviewed head only in agent guidance. Existing Codecov comment not repeated.
13
+
Scope: cumulative PR changes in `b9fb06973b^..9d19d30a38`, accounting for both main merges. Reviewed final PR delta against `9d19d30a38^2`; upstream-only changes excluded. No UNPICK commits reviewed. Checkout differs from reviewed head only in agent guidance and this review file. GitHub PR head still matches `9d19d30a38`. Existing Codecov comment not repeated.
14
14
15
15
## Decision
16
16
-[x] Approve with suggestions
17
17
-[ ] Request changes
18
18
19
19
The issue is valid: after a right row matches, subsequent comparisons cannot change semi/anti membership. Traced candidate deduplication, sliced bitmap segments, compaction mappings, empty-input handling, per-right-batch reset, and original-coordinate spill merging. No public API or schema change found.
20
20
21
-
Validation:
21
+
Validation recorded by the original review (not rerun during this recheck):
22
22
-`cargo test -p datafusion-physical-plan joins::nested_loop_join::tests --lib --offline`: **77 passed**.
23
23
-`cargo test -p datafusion-sqllogictest --test sqllogictests --offline -- nested_loop_join_existence nested_loop_join_spill`: **both files passed**. macOS linker emitted an unwind-table-size warning.
-`target/debug/benchmark_runner nlj --query 20 --dry-run`: configuration resolved successfully; this does not execute or validate the physical plan.
26
-
- Full workspace CI and before/after performance measurements were not run; no measured speedup claimed by this review.
26
+
- Full workspace CI and before/after performance measurements were not run locally; no independently measured speedup claimed by this review.
27
+
28
+
Recheck evidence:
29
+
-`RightExistenceProbe::new` (`nested_loop_join.rs:1963–1980`) deduplicates right source indices in encounter order and remaps filter indices to that projection. `compact` (`2091–2114`) preserves original row coordinates and applies the same row selection to every projected column.
30
+
- Existing staged-compaction SQL cases (`nested_loop_join_existence.slt:48–61`) reference only `r.k`; `prepare_join_filter` (`nested_loop_join.rs:4905–4916`) likewise supplies only one right filter column. The proposed multi-column combination is not redundant.
31
+
- PR description now reports before/after benchmarks, including small regressions for repeated-match (+1.84%) and final-probe (+1.28%) controls. These author-reported results were not reproduced here.
32
+
- GitHub CI at recheck: no failed checks; several checks, including amd64 tests, clippy, and benchmark verification, remain pending. Approval does not substitute for required CI.
body: Low — Consider a small regression test whose filter references two distinct right columns in a different order from their source schema, with staged matches forcing compaction. The new projection/remapping loop owns this positional contract, while the added SQL compaction cases reference only one right filter column. Assert original payloads for both RightSemi and RightAnti. Non-blocking: the remapping logic looks correct and existing tests pass.
41
+
body: Low — Consider a small SQLLogicTest with two distinct right filter columns and staged matches forcing compaction. Make each column affect membership and assert original payloads for both RightSemi and RightAnti. If testing reversed projection order, confirm the physical JoinFilter references those columns out of source-schema order; SQL expression order alone does not prove this. The new projection/remapping loop owns this positional contract, while existing staged-compaction cases reference only one right filter column. Non-blocking coverage improvement, not a demonstrated bug: the remapping and common row selection look correct.
36
42
37
43
## High-impact refactor opportunities (out of scope)
38
44
No high-impact opportunity justified in touched code. The introduced probe state already owns candidate coordinates, original coordinates, and match deduplication together; the shared filter helper removes duplicated evaluation. Splitting these further would add interfaces without resolving an observed correctness or maintenance problem. The pre-existing stream/spill state machine is larger, but this PR does not establish evidence for a broad redesign.
39
45
40
46
## Follow-up actions
41
47
- Optionally add the multi-column remapping regression above.
42
-
- Confirm normal CI passes and compare the new benchmark cases against main using identical release settings, especially no-match and repeated-match controls.
48
+
- Confirm remaining required CI passes. If reproducing the author-reported benchmarks, compare against main using identical release settings, especially no-match and repeated-match controls.
0 commit comments