You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "gengliangwang (via GitHub)" <gi...@apache.org> on 2026/05/23 06:13:39 UTC

[PR] [SPARK-57028][SQL] HashJoin: drop conditionPassed in codegenOuter when there is no join condition [spark]

gengliangwang opened a new pull request, #56076:
URL: https://github.com/apache/spark/pull/56076

   ### What changes were proposed in this pull request?
   
   This is a sub-task of [SPARK-56908](https://issues.apache.org/jira/browse/SPARK-56908).
   
   `HashJoin.codegenOuter` emits a `boolean conditionPassed` variable plus either an `if (!conditionPassed) { reset }` block (unique-key path) or an `if (conditionPassed) { ... }` wrap around the inner loop body (non-unique-key path) regardless of whether `condition` is defined.
   
   When `condition.isEmpty`:
   - the variable is initialized to `true` and never reassigned;
   - the `if (!conditionPassed)` reset block is dead;
   - the `if (conditionPassed)` wrap is unconditional.
   
   Detect `condition.isEmpty` and omit the variable, the reset block, and the wrap.
   
   ### Why are the changes needed?
   
   Smaller generated Java per stage for the common case where outer joins have no join condition. JIT eliminates the dead code at runtime; the win is smaller generated source, more 64KB method-limit headroom, and slightly faster Janino compile.
   
   ### Does this PR introduce _any_ user-facing change?
   
   No.
   
   ### How was this patch tested?
   
   Existing `OuterJoinSuite` covers `BroadcastHashJoin` and `ShuffledHashJoin` outer joins with whole-stage codegen on and off, with and without join conditions.
   
   ### Was this patch authored or co-authored using generative AI tooling?
   
   Generated-by: Claude Code
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [SPARK-57028][SQL] HashJoin: drop conditionPassed in codegenOuter when there is no join condition [spark]

Posted by "gengliangwang (via GitHub)" <gi...@apache.org>.
gengliangwang closed pull request #56076: [SPARK-57028][SQL] HashJoin: drop conditionPassed in codegenOuter when there is no join condition
URL: https://github.com/apache/spark/pull/56076


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [SPARK-57028][SQL] HashJoin: drop conditionPassed in codegenOuter when there is no join condition [spark]

Posted by "gengliangwang (via GitHub)" <gi...@apache.org>.
gengliangwang commented on PR #56076:
URL: https://github.com/apache/spark/pull/56076#issuecomment-4585747884

   @LuciferYang Thanks for the review. Merging to master/4.x


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org