uros-db commented on code in PR #54114:
URL: https://github.com/apache/spark/pull/54114#discussion_r2763850916


##########
sql/catalyst/src/main/java/org/apache/spark/sql/catalyst/util/geo/GeometryModel.java:
##########
@@ -176,4 +176,50 @@ GeometryCollection asGeometryCollection() {
     throw new ClassCastException(
       "Cannot cast " + getClass().getSimpleName() + " to GeometryCollection");
   }
+
+  /**
+   * Appends dimension suffix (Z, M, or ZM) to the WKT type name.
+   */
+  protected void appendDimensionSuffix(StringBuilder sb) {
+    if (hasZ && hasM) {
+      sb.append(" ZM");
+    } else if (hasZ) {
+      sb.append(" Z");
+    } else if (hasM) {
+      sb.append(" M");
+    }
+  }
+
+  /**
+   * Appends the WKT (Well-Known Text) representation of this geometry to the 
given StringBuilder.
+   */
+  protected void toWkt(StringBuilder sb) {
+    sb.append(typeId.getWktName());

Review Comment:
   Let's continue the discussion in 
https://github.com/apache/spark/pull/54114#discussion_r2761587747, and I'll 
make sure to follow up accordingly if needed. The repeating theme here is that 
I tend to lean towards minimizing the number of append calls per run.



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to