You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sedona.apache.org by GitBox <gi...@apache.org> on 2022/11/03 16:19:19 UTC

[GitHub] [incubator-sedona] jiayuasu commented on a diff in pull request #706: [SEDONA-186] Fix ordering of columns in results of queries like SELECT * A JOIN B

jiayuasu commented on code in PR #706:
URL: https://github.com/apache/incubator-sedona/pull/706#discussion_r1013122734


##########
sql/src/main/scala/org/apache/spark/sql/sedona_sql/strategy/join/JoinQueryDetector.scala:
##########
@@ -164,9 +164,9 @@ class JoinQueryDetector(sparkSession: SparkSession) extends Strategy {
     val relationship = s"ST_$spatialPredicate"
 
     matchExpressionsToPlans(a, b, left, right) match {
-      case Some((planA, planB, _)) =>
+      case Some((planA, planB, swappedLeftAndRight)) =>
         logInfo(s"Planning spatial join for $relationship relationship")
-        RangeJoinExec(planLater(planA), planLater(planB), a, b, spatialPredicate, extraCondition) :: Nil
+        RangeJoinExec(planLater(planA), planLater(planB), a, b, swappedLeftAndRight, spatialPredicate, extraCondition) :: Nil

Review Comment:
   @Kimahriman Adam, does @Kontinuation 's approach "Inverting the spatial predicate" sound good to you? :-)



-- 
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-unsubscribe@sedona.apache.org

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