iGN5117 commented on code in PR #856:
URL: https://github.com/apache/sedona/pull/856#discussion_r1225885282


##########
flink/src/test/java/org/apache/sedona/flink/FunctionTest.java:
##########
@@ -699,4 +699,14 @@ public void testNumPoints() {
         assertEquals(expected, actual);
     }
 
+    @Test

Review Comment:
   Added



##########
sql/common/src/test/scala/org/apache/sedona/sql/dataFrameAPITestScala.scala:
##########
@@ -957,5 +957,13 @@ class dataFrameAPITestScala extends TestBaseScala {
       val expectedResult = 3
       assert(actualResult == expectedResult)
     }
+
+    it("Passed ST_Force3D") {
+      val lineDf = sparkSession.sql("SELECT 
ST_Force3D(ST_GeomFromWKT('LINESTRING (0 1, 1 0, 2 0)'), 2.3) AS geom")

Review Comment:
   Added



##########
sql/common/src/test/scala/org/apache/sedona/sql/functionTestScala.scala:
##########
@@ -1921,4 +1921,18 @@ class functionTestScala extends TestBaseScala with 
Matchers with GeometrySample
       assertEquals(expected, actual)
     }
   }
+
+  it("should pass ST_Force3D") {
+    val geomTestCases = Map(
+      ("'LINESTRING (0 1, 1 0, 2 0)'") -> "'LINESTRING Z(0 1 1, 1 0 1, 2 0 
1)'",
+      ("'LINESTRING Z(0 1 3, 1 0 3, 2 0 3)'") -> "'LINESTRING Z(0 1 3, 1 0 3, 
2 0 3)'",
+      ("'LINESTRING EMPTY'") -> "'LINESTRING EMPTY'"
+    )
+    for (((geom), expectedResult) <- geomTestCases) {
+      val df = sparkSession.sql(s"SELECT 
ST_AsText(ST_Force3D(ST_GeomFromWKT($geom), 1)) AS geom, " + s"$expectedResult")

Review Comment:
   Added



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

Reply via email to