[AURON #1792][FOLLOWUP] Broadcast isNullAwareAntiJoin flag#1866
Merged
richox merged 1 commit intoapache:masterfrom Jan 12, 2026
Merged
[AURON #1792][FOLLOWUP] Broadcast isNullAwareAntiJoin flag#1866richox merged 1 commit intoapache:masterfrom
richox merged 1 commit intoapache:masterfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds support for broadcasting the isNullAwareAntiJoin flag from Spark to the native execution engine to correctly handle NULL values in anti-joins. In standard LEFT ANTI JOINs, rows with NULL keys should be included in the result (since NULL never matches anything), while in null-aware anti-joins (e.g., NOT IN queries), rows with NULL keys should be excluded.
Key Changes:
- Added
isNullAwareAntiJoinboolean parameter throughout the broadcast join code path - Implemented version-specific handling for Spark 3.0 (which lacks this field) vs Spark 3.1+
- Updated Rust join logic to conditionally filter NULL keys based on the flag value
- Unified test expectations across all join types to ensure consistent NULL handling
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| native-engine/auron-serde/proto/auron.proto | Added is_null_aware_anti_join boolean field to BroadcastJoinExecNode message |
| native-engine/auron-serde/src/from_proto.rs | Updated protobuf deserialization to read and pass the new field |
| native-engine/datafusion-ext-plans/src/broadcast_join_exec.rs | Added field to struct, constructor, and cloning logic |
| native-engine/datafusion-ext-plans/src/joins/mod.rs | Added field to JoinParams struct to pass flag through join pipeline |
| native-engine/datafusion-ext-plans/src/joins/bhj/semi_join.rs | Implemented logic to exclude NULL keys for null-aware anti-joins |
| native-engine/datafusion-ext-plans/src/joins/test.rs | Updated test to verify consistent NULL handling across all join types |
| native-engine/datafusion-ext-plans/src/sort_merge_join_exec.rs | Initialized field to false for sort-merge joins |
| spark-extension/src/main/scala/org/apache/spark/sql/auron/AuronConverters.scala | Added version-specific methods to extract flag from BroadcastHashJoinExec |
| spark-extension/src/main/scala/org/apache/spark/sql/auron/Shims.scala | Updated interface to include new parameter |
| spark-extension/src/main/scala/org/apache/spark/sql/execution/auron/plan/NativeBroadcastJoinBase.scala | Added parameter to base class constructor |
| spark-extension-shims-spark/src/main/scala/org/apache/spark/sql/auron/ShimsImpl.scala | Updated implementation to pass through the flag |
| spark-extension-shims-spark/src/main/scala/org/apache/spark/sql/execution/joins/auron/plan/NativeBroadcastJoinExec.scala | Added parameter to case class |
| spark-extension-shims-spark/src/test/scala/org/apache/auron/AuronQuerySuite.scala | Added two tests verifying standard and null-aware anti-join behavior |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
cxzl25
commented
Jan 9, 2026
| } | ||
| } | ||
|
|
||
| test("left join with NOT IN subquery should filter NULL values") { |
Contributor
Author
There was a problem hiding this comment.
== Results ==
!== Correct Answer - 1 == == Spark Answer - 1 ==
struct<cnt:bigint> struct<cnt:bigint>
![9] [99999] (QueryTest.scala:243)
richox
approved these changes
Jan 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
Closes #1792
Rationale for this change
What changes are included in this PR?
Are there any user-facing changes?
How was this patch tested?
Add UT