You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sedona.apache.org by ji...@apache.org on 2022/04/25 22:33:19 UTC

[incubator-sedona] branch master updated: [SEDONA-118] Using the within function of JTS for ST_Within (#623)

This is an automated email from the ASF dual-hosted git repository.

jiayu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-sedona.git


The following commit(s) were added to refs/heads/master by this push:
     new 52159191 [SEDONA-118] Using the within function of JTS for ST_Within (#623)
52159191 is described below

commit 52159191baef38ddca3c4198857e4a671c175454
Author: Dimitris Bilidas <d....@di.uoa.gr>
AuthorDate: Tue Apr 26 01:33:14 2022 +0300

    [SEDONA-118] Using the within function of JTS for ST_Within (#623)
---
 .../org/apache/spark/sql/sedona_sql/expressions/Predicates.scala    | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/sql/src/main/scala/org/apache/spark/sql/sedona_sql/expressions/Predicates.scala b/sql/src/main/scala/org/apache/spark/sql/sedona_sql/expressions/Predicates.scala
index 3f5d2894..bce0ead8 100644
--- a/sql/src/main/scala/org/apache/spark/sql/sedona_sql/expressions/Predicates.scala
+++ b/sql/src/main/scala/org/apache/spark/sql/sedona_sql/expressions/Predicates.scala
@@ -108,7 +108,7 @@ case class ST_Within(inputExpressions: Seq[Expression])
   // This is a binary expression
   assert(inputExpressions.length == 2)
 
-  override def toString: String = s" **${ST_Intersects.getClass.getName}**  "
+  override def toString: String = s" **${ST_Within.getClass.getName}**  "
 
   override def children: Seq[Expression] = inputExpressions
 
@@ -120,7 +120,7 @@ case class ST_Within(inputExpressions: Seq[Expression])
 
     val rightGeometry = GeometrySerializer.deserialize(rightArray)
 
-    leftGeometry.coveredBy(rightGeometry)
+    leftGeometry.within(rightGeometry)
   }
 
   override def dataType = BooleanType
@@ -303,4 +303,4 @@ case class ST_Disjoint(inputExpressions: Seq[Expression])
   protected def withNewChildrenInternal(newChildren: IndexedSeq[Expression]) = {
     copy(inputExpressions = newChildren)
   }
-}
\ No newline at end of file
+}