oss-maker commented on code in PR #41860:
URL: https://github.com/apache/spark/pull/41860#discussion_r1254299125


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/joins.scala:
##########
@@ -484,6 +484,20 @@ trait JoinSelectionHelper {
     hint.rightHint.exists(_.strategy.contains(NO_BROADCAST_AND_REPLICATION))
   }
 
+  def canLeftSideBeBroadcast(left: LogicalPlan, conf: SQLConf,
+                             hint: JoinHint, joinType: JoinType): Boolean = {
+    // Left side can not be broadcast for left outer join and left semi join.
+    canBuildBroadcastLeft(joinType) &&
+      (canBroadcastBySize(left, conf) || hintToBroadcastLeft(hint))
+  }
+
+  def canRightSideBeBroadcast(right: LogicalPlan, conf: SQLConf,
+                              hint: JoinHint, joinType: JoinType): Boolean = {

Review Comment:
   Ditto



##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/joins.scala:
##########
@@ -484,6 +484,20 @@ trait JoinSelectionHelper {
     hint.rightHint.exists(_.strategy.contains(NO_BROADCAST_AND_REPLICATION))
   }
 
+  def canLeftSideBeBroadcast(left: LogicalPlan, conf: SQLConf,
+                             hint: JoinHint, joinType: JoinType): Boolean = {

Review Comment:
   Apologies, didn't see this earlier. Please indent in similar way. Parameters 
starting in new line indented by 4 spaces.



-- 
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