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/04/22 08:02:46 UTC

[GitHub] [incubator-sedona] kvpankaj1999 commented on a diff in pull request #615: [SEDONA 115] Add ST_XMax and ST_XMin functions

kvpankaj1999 commented on code in PR #615:
URL: https://github.com/apache/incubator-sedona/pull/615#discussion_r855882778


##########
sql/src/test/scala/org/apache/sedona/sql/functionTestScala.scala:
##########
@@ -335,6 +335,18 @@ class functionTestScala extends TestBaseScala with Matchers with GeometrySample
 
     }
 
+    it("Passed ST_XMax") {
+      var test = sparkSession.sql("SELECT ST_XMax(ST_GeomFromWKT('POLYGON ((-3 -3, 3 -3, 3 3, -3 3, -3 -3))'))")

Review Comment:
   Changed the test case



##########
sql/src/test/scala/org/apache/sedona/sql/functionTestScala.scala:
##########
@@ -335,6 +335,18 @@ class functionTestScala extends TestBaseScala with Matchers with GeometrySample
 
     }
 
+    it("Passed ST_XMax") {
+      var test = sparkSession.sql("SELECT ST_XMax(ST_GeomFromWKT('POLYGON ((-3 -3, 3 -3, 3 3, -3 3, -3 -3))'))")
+      assert(test.take(1)(0).get(0).asInstanceOf[Double] == 3.0)
+
+    }
+
+    it("Passed ST_XMin") {
+      var test = sparkSession.sql("SELECT ST_XMin(ST_GeomFromWKT('POLYGON ((-3 -3, 3 -3, 3 3, -3 3, -3 -3))'))")

Review Comment:
   Changed the test case



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