maheshk114 commented on code in PR #41860:
URL: https://github.com/apache/spark/pull/41860#discussion_r1286800583


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/InjectRuntimeFilter.scala:
##########
@@ -185,14 +186,18 @@ object InjectRuntimeFilter extends Rule[LogicalPlan] with 
PredicateHelper with J
   }
 
   private def isProbablyShuffleJoin(left: LogicalPlan,
-      right: LogicalPlan, hint: JoinHint): Boolean = {
-    !hintToBroadcastLeft(hint) && !hintToBroadcastRight(hint) &&
-      !canBroadcastBySize(left, conf) && !canBroadcastBySize(right, conf)
+      right: LogicalPlan,
+      hint: JoinHint,
+      joinType: JoinType): Boolean = {
+    // If any of the side can be broadcast, then it is not a shuffle join.
+    !(canLeftSideBeBroadcast(left, conf, hint, joinType) ||
+      canRightSideBeBroadcast(right, conf, hint, joinType))

Review Comment:
   @beliefer 
   I have fixed the format issue. The earlier check was like this, as per 
@oss-maker  suggestion I have modified like this as I found it to be more 
intuitive.  



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to