jiayuasu commented on code in PR #910:
URL: https://github.com/apache/sedona/pull/910#discussion_r1268817929


##########
docs/api/flink/Function.md:
##########
@@ -1087,6 +1087,20 @@ Example:
 SELECT ST_IsClosed(ST_GeomFromText('LINESTRING(0 0, 1 1, 1 0)'))
 ```
 
+## ST_IsCollection
+
+Introduction: Returns `TRUE` if the argument type is a geometry collection 
type.
+
+Format: `ST_IsCollection(geom: geometry)`
+
+Since: `v1.5.0`
+
+Example:
+
+```sql

Review Comment:
   Please provide two examples of the output. One is `true` and another one is 
`false`



##########
docs/api/sql/Function.md:
##########
@@ -1082,6 +1082,20 @@ SELECT ST_IsClosed(ST_GeomFromText('LINESTRING(0 0, 1 1, 
1 0)'))
 
 Output: `false`
 
+## ST_IsCollection
+
+Introduction: Returns `TRUE` if the argument type is a geometry collection 
type.
+
+Format: `ST_IsCollection(geom: geometry)`
+
+Since: `v1.5.0`
+
+Example:
+
+```sql
+SELECT ST_IsCollection(ST_GeomFromText('MULTIPOINT(0 0), (6 6)'))

Review Comment:
   Same here



##########
sql/common/src/main/scala/org/apache/spark/sql/sedona_sql/expressions/st_functions.scala:
##########
@@ -384,5 +384,9 @@ object st_functions extends DataFrameAPI {
 
   def ST_CoordDim(geometry: String): Column = 
wrapExpression[ST_CoordDim](geometry)
 
+  def ST_IsCollection(geometry: Column): Column = 
wrapExpression[ST_IsCollection](geometry)

Review Comment:
   Spark DataFrame style API is not tested. Please add test cases.



##########
common/src/main/java/org/apache/sedona/common/Functions.java:
##########
@@ -988,6 +988,14 @@ public static double frechetDistance(Geometry g1, Geometry 
g2) {
         return GeomUtils.getFrechetDistance(g1, g2);
     }
 
+    public static boolean isCollection(Geometry geometry) {
+        String geoType = geometry.getGeometryType();

Review Comment:
   Please implement test cases in Sedona common



##########
flink/src/main/java/org/apache/sedona/flink/expressions/Functions.java:
##########
@@ -13,6 +13,7 @@
  */
 package org.apache.sedona.flink.expressions;
 
+import org.apache.calcite.interpreter.Scalar;

Review Comment:
   Why is the calcite class introduced here?



-- 
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-unsubscr...@sedona.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to