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


##########
sql/src/test/scala/org/apache/sedona/sql/constructorTestScala.scala:
##########
@@ -204,5 +204,15 @@ class constructorTestScala extends TestBaseScala {
       var spatialRDD2 = Adapter.toSpatialRdd(df, "geometry")
       Adapter.toDf(spatialRDD2, sparkSession).show(1)
     }
+
+    it("Passed ST_MLineFromWKT") {

Review Comment:
   Please add tests for the input with SRID



##########
flink/src/main/java/org/apache/sedona/flink/expressions/Constructors.java:
##########
@@ -185,4 +185,19 @@ public Geometry eval(@DataTypeHint("String") String kml) 
throws ParseException {
             return new KMLReader().read(kml);
         }
     }
+
+    public static class ST_MPolyFromWKT extends ScalarFunction {

Review Comment:
   Please create overload functions to take care of the inputs with SRID



##########
sql/src/main/scala/org/apache/spark/sql/sedona_sql/expressions/st_constructors.scala:
##########
@@ -73,4 +73,11 @@ object st_constructors extends DataFrameAPI {
 
   def ST_PolygonFromText(coords: Column, delimiter: Column): Column = 
wrapExpression[ST_PolygonFromText](coords, delimiter)
   def ST_PolygonFromText(coords: String, delimiter: String): Column = 
wrapExpression[ST_PolygonFromText](coords, delimiter)
+
+  def ST_MPolyFromWKT(wkt: Column): Column = 
wrapExpression[ST_MPolyFromWKT](wkt, 0)
+  def ST_MPolyFromWKT(wkt: String): Column = 
wrapExpression[ST_MPolyFromWKT](wkt, 0)

Review Comment:
   Please handle the case with optional SRID



##########
docs/api/flink/Constructor.md:
##########
@@ -134,6 +134,32 @@ Spark SQL example:
 SELECT ST_LineStringFromText('Linestring(1 2, 3 4)') AS line
 ```
 
+## ST_MLineFromWKT
+
+Introduction: Construct a MultiLineString from Text
+
+Format: `ST_MLineFromWKT (Text:string)`
+
+Since: `1.3.0`

Review Comment:
   The version should be 1.3.1



##########
common/src/main/java/org/apache/sedona/common/Constructors.java:
##########
@@ -28,4 +28,20 @@ public static Geometry geomFromWKT(String wkt, int srid) 
throws ParseException {
         GeometryFactory geometryFactory = new GeometryFactory(new 
PrecisionModel(), srid);
         return new WKTReader(geometryFactory).read(wkt);
     }
+
+    public static Geometry mLineFromWKT(String wkt, int srid) throws 
ParseException {

Review Comment:
   The function names should be `FromText`, not `FromWKT`



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