[ 
https://issues.apache.org/jira/browse/SPARK-45846?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18049074#comment-18049074
 ] 

Dipanshu Pandey edited comment on SPARK-45846 at 1/5/26 7:27 AM:
-----------------------------------------------------------------

Hi [~manisethu] ,

Yes when broadcast joins are disabled, Spark falls back to {*}Broadcast Nested 
Loop Join (BNLJ){*}, as seen in the physical plan below.

With broadcast disabled ({{{}autoBroadcastJoinThreshold = -1{}}}):
{code:java}
  Physical Plan:
  BroadcastNestedLoopJoinExec(
    buildSide=BuildRight,
    joinType=LeftAnti
  )
{code}
 


was (Author: JIRAUSER311986):
Hi [~manisethu] ,

Yes when broadcast joins are disabled, Spark falls back to {*}Broadcast Nested 
Loop Join (BNLJ){*}, as seen in the physical plan below.

With broadcast disabled ({{{}autoBroadcastJoinThreshold = -1{}}}):



 
{code:java}
With Broadcast Disabled (autoBroadcastJoinThreshold = -1):
  Physical Plan:
  BroadcastNestedLoopJoinExec(
    buildSide=BuildRight,
    joinType=LeftAnti
  )
{code}
 

> spark.sql.optimizeNullAwareAntiJoin should respect 
> spark.sql.autoBroadcastJoinThreshold
> ---------------------------------------------------------------------------------------
>
>                 Key: SPARK-45846
>                 URL: https://issues.apache.org/jira/browse/SPARK-45846
>             Project: Spark
>          Issue Type: Improvement
>          Components: SQL
>    Affects Versions: 4.0.0
>            Reporter: Chao Sun
>            Priority: Major
>              Labels: pull-request-available
>
> Normally broadcast join can be disabled when users set 
> {{spark.sql.autoBroadcastJoinThreshold}} to -1. However this doesn't apply to 
> {{spark.sql.optimizeNullAwareAntiJoin}}:
> {code}
>       case j @ ExtractSingleColumnNullAwareAntiJoin(leftKeys, rightKeys) =>
>         Seq(joins.BroadcastHashJoinExec(leftKeys, rightKeys, LeftAnti, 
> BuildRight,
>           None, planLater(j.left), planLater(j.right), isNullAwareAntiJoin = 
> true))
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to