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


##########
sql/catalyst/src/main/java/org/apache/spark/sql/catalyst/util/geo/Polygon.java:
##########
@@ -54,4 +54,23 @@ boolean isEmpty() {
   int getDimensionCount() {
     return 2 + (hasZ ? 1 : 0) + (hasM ? 1 : 0);
   }
+
+  @Override
+  protected void appendWktContent(StringBuilder sb) {
+    for (int i = 0; i < rings.size(); i++) {
+      if (i > 0) {
+        sb.append(",");
+      }
+      rings.get(i).appendCoordinatesToWkt(sb);
+    }
+  }
+
+  /**
+   * Appends the polygon coordinates wrapped in parentheses for use in 
MultiPolygon.
+   */
+  void appendCoordinatesToWkt(StringBuilder sb) {

Review Comment:
   Nice & clean! Applied the suggestion.



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