uros-db commented on code in PR #54114:
URL: https://github.com/apache/spark/pull/54114#discussion_r2763841797
##########
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");
Review Comment:
Good question, thanks for pointing it out - although I think that the
current version is slightly better because it makes just 1 `append` call to the
string builder per execution path, whereas the alternative would make 2 calls.
As for repeated spaces across literals, well we do need to have these strings
anyways but that shouldn't be too big of an issue given that there is a fixed
limited amount of them. However, I am open to discussion - so please let me
know what you think.
--
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]