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


##########
sql/catalyst/src/main/java/org/apache/spark/sql/catalyst/util/Geometry.java:
##########
@@ -130,8 +130,14 @@ public static Geometry fromEwkt(byte[] ewkt) {
   /** Geometry binary standard format converters: WKB and EWKB. */
 
   @Override
-  public byte[] toWkb() {
-    return toWkbInternal(DEFAULT_ENDIANNESS);
+  public byte[] toWkb(String endianness) {
+    // Check the endianness value.
+    if (!endianness.equalsIgnoreCase("NDR") && 
!endianness.equalsIgnoreCase("XDR")) {
+      throw QueryExecutionErrors.stInvalidArgumentErrorInvalidEndiannessValue(
+          "st_asbinary", endianness);

Review Comment:
   Updated this too.



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