Skip to content

[AURON #2783] Skip already matched build rows in native semi and anti joins - #2784

Open
richox wants to merge 1 commit into
apache:masterfrom
richox:auron-2783-skip-matched-semi-anti
Open

richox wants to merge 1 commit into
apache:masterfrom
richox:auron-2783-skip-matched-semi-anti

Conversation

@richox

@richox richox commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

Closes #2783

Rationale for this change

A semi or anti join needs to know whether an output-side row has any candidate satisfying the complete join condition. For build-side-output joins with residual predicates, later candidates for an already matched build row cannot change its inclusion or exclusion, but currently still incur key comparisons, gathers, and filter evaluation.

What changes are included in this PR?

  • Check the existing build-side match bitmap before key comparison in the residual-filter candidate loop for build-side-output semi and anti hash joins.
  • Skip candidates for rows whose match has already been confirmed; retain rows whose previous residual result was false or null.
  • Keep per-row match tracking, candidate chunking, probe-side early stops, and existence-join handling unchanged.
  • Add build-side-output semi-join regressions for both build orientations, multiple probe batches, duplicate build rows, null keys and filter values, empty inputs, and candidate-chunk boundaries. Compare complete output rows with a reference implementation.
  • Add a counting-filter regression that expects 3 candidate evaluations instead of 6 when later probe batches revisit confirmed matches.
  • Extend operator/spill parity coverage with compound residual conditions, including semi and anti join variants.

Are there any user-facing changes?

No new SQL syntax, configuration, or join types are introduced. Eligible semi and anti joins avoid repeated work for already matched build rows while preserving their output-row selection.

Residual expressions on skipped candidates are no longer evaluated, so side effects or errors from those redundant evaluations may differ, as with existing probe-side early-stop behavior.

How was this patch tested?

The commit includes regression coverage described above. Local validation was stopped at the contributor's request; no completed local validation results are claimed for this submission. Validation is delegated to GitHub CI.

No benchmark speedup is claimed.

Was this patch authored or co-authored using generative AI tooling?

  • Yes
  • No

Generated-by: myflicker 0.4.1.abb (GPT-6.1 Sol)

AI tooling assisted with review and preparation of the issue and PR text. The submitted code comes from commit a82f2f273208cf3be74d0cdd3e7e372469cd5867.

ASF guidance: https://www.apache.org/legal/generative-tooling.html

@github-actions github-actions Bot added the native label Dec 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Skip already matched build rows in native semi and anti joins

1 participant