tanelk commented on code in PR #711:
URL: https://github.com/apache/incubator-sedona/pull/711#discussion_r1027312994


##########
sql/src/main/scala/org/apache/spark/sql/sedona_sql/strategy/join/JoinQueryDetector.scala:
##########
@@ -206,14 +223,32 @@ class JoinQueryDetector(sparkSession: SparkSession) 
extends Strategy {
     }
   }
 
-  private def planBroadcastJoin(left: LogicalPlan,
-                                right: LogicalPlan,
-                                children: Seq[Expression],
-                                spatialPredicate: SpatialPredicate,
-                                indexType: IndexType,
-                                broadcastLeft: Boolean,
-                                extraCondition: Option[Expression],
-                                distance: Option[Expression]): Seq[SparkPlan] 
= {
+  private def planBroadcastJoin(
+    left: LogicalPlan,
+    right: LogicalPlan,
+    children: Seq[Expression],
+    joinType: JoinType,
+    spatialPredicate: SpatialPredicate,
+    indexType: IndexType,
+    broadcastLeft: Boolean,
+    broadcastRight: Boolean,
+    extraCondition: Option[Expression],
+    distance: Option[Expression]): Seq[SparkPlan] = {
+
+    val broadcastSide = joinType match {
+      case Inner if broadcastLeft => Some(LeftSide)
+      case Inner if broadcastRight => Some(RightSide)
+      case LeftSemi if broadcastRight => Some(RightSide)
+      case LeftAnti if broadcastRight => Some(RightSide)
+      case LeftOuter if broadcastRight => Some(RightSide)
+      case RightOuter if broadcastLeft => Some(LeftSide)

Review Comment:
   I could not figure out how to easily implement other combinations



-- 
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: dev-unsubscr...@sedona.apache.org

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

Reply via email to