Copilot commented on code in PR #2851:
URL: https://github.com/apache/sedona/pull/2851#discussion_r3125367922


##########
docs/api/sql/geography/Geography-Functions.md:
##########
@@ -43,6 +43,7 @@ These functions operate on geography type objects.
 | :--- | :--- | :--- | :--- |
 | [ST_AsEWKT](Geography-Functions/ST_AsEWKT.md) | String | Return the Extended 
Well-Known Text representation of a geography. | v1.8.0 |
 | [ST_Envelope](Geography-Functions/ST_Envelope.md) | Geography | Return the 
bounding box (envelope) of a geography. Supports anti-meridian splitting. | 
v1.8.0 |
+| [ST_NumGeometries](Geography-Functions/ST_NumGeometries.md) | Integer | 
Return the number of sub-geometries in a geography (1 for single geometries). | 
v1.9.1 |
 | [ST_NPoints](Geography-Functions/ST_NPoints.md) | Integer | Return the 
number of points (vertices) in a geography. | v1.9.0 |
 | [ST_Distance](Geography-Functions/ST_Distance.md) | Double | Return the 
minimum geodesic distance between two geographies in meters. | v1.9.0 |
 | [ST_Contains](Geography-Functions/ST_Contains.md) | Boolean | Test whether 
geography A fully contains geography B. | v1.9.0 |

Review Comment:
   The "Since" versions in this Geography functions table are inconsistent with 
the linked per-function docs (e.g., ST_NPoints/ST_Distance/ST_Contains pages 
say v1.9.1, but the table still shows v1.9.0). Since this PR is already 
updating this table, please align the "Since" column values so the index 
matches the individual function pages.
   ```suggestion
   | [ST_NPoints](Geography-Functions/ST_NPoints.md) | Integer | Return the 
number of points (vertices) in a geography. | v1.9.1 |
   | [ST_Distance](Geography-Functions/ST_Distance.md) | Double | Return the 
minimum geodesic distance between two geographies in meters. | v1.9.1 |
   | [ST_Contains](Geography-Functions/ST_Contains.md) | Boolean | Test whether 
geography A fully contains geography B. | v1.9.1 |
   ```



##########
spark/common/src/main/scala/org/apache/spark/sql/sedona_sql/expressions/Functions.scala:
##########
@@ -1060,7 +1060,9 @@ private[apache] object ST_IsRing {
  *   Geometry
  */
 private[apache] case class ST_NumGeometries(inputExpressions: Seq[Expression])
-    extends InferredExpression(Functions.numGeometries _) {
+    extends InferredExpression(
+      inferrableFunction1(Functions.numGeometries),
+      
inferrableFunction1(org.apache.sedona.common.geography.Functions.numGeometries))
 {

Review Comment:
   The scaladoc for ST_NumGeometries still documents the input as "Geometry" 
and references the SQL/MM spec for geometry only, but the expression now also 
supports Geography via dual-dispatch. Please update the scaladoc to reflect 
both supported input types (Geometry and Geography) to avoid misleading API 
docs.



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