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


##########
docs/api/sql/Constructor.md:
##########
@@ -172,6 +172,24 @@ FROM linestringtable
 SELECT 
ST_LineStringFromText('-74.0428197,40.6867969,-74.0421975,40.6921336,-74.0508020,40.6912794',
 ',') AS linestringshape
 ```
 
+## ST_LineFromText
+
+Introduction: Construct a Line from Text, delimited by Delimiter
+
+Format: `ST_LineFromText (Text:string, Delimiter:char)`
+
+Since: `v1.0.0`

Review Comment:
   v1.2.1



##########
sql/src/main/scala/org/apache/spark/sql/sedona_sql/expressions/Constructors.scala:
##########
@@ -94,6 +94,37 @@ case class ST_PolygonFromText(inputExpressions: 
Seq[Expression])
   }
 }
 
+/**
+  * Return a line from a string. The string must be plain string and each 
coordinate must be separated by a delimiter.
+  *
+  * @param inputExpressions
+  */
+case class ST_LineFromText(inputExpressions: Seq[Expression])

Review Comment:
   This implementation is not consistent with PostGIS: 
https://postgis.net/docs/ST_LineFromText.html
   
   The input string must be WKT. The logic should simply re-use the 
ST_GeomFromWKT



##########
sql/src/test/scala/org/apache/sedona/sql/predicateTestScala.scala:
##########
@@ -140,6 +140,37 @@ class predicateTestScala extends TestBaseScala {
       assert(equaldf.count() == 0, s"Expected 0 value but got 
${equaldf.count()}")
 
     }
+
+    it("Passed ST_Equals for ST_LineFromText and ST_Polygon") {

Review Comment:
   Please create a simple test case. Not sure why this has anything to do with 
polygons.



##########
docs/archive/api/sql/GeoSparkSQL-Constructor.md:
##########
@@ -155,6 +155,24 @@ FROM polygontable
 SELECT 
ST_PolygonFromText('-74.0428197,40.6867969,-74.0421975,40.6921336,-74.0508020,40.6912794,-74.0428197,40.6867969',
 ',') AS polygonshape
 ```
 
+## ST_LineFromText

Review Comment:
   This doc is put in wrong place



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