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


##########
sql/catalyst/src/main/java/org/apache/spark/sql/catalyst/util/Geography.java:
##########
@@ -130,8 +130,13 @@ public static Geography fromEwkt(byte[] ewkt) {
   /** Geography binary standard format converters: WKB and EWKB. */
 
   @Override
-  public byte[] toWkb() {
-    return toWkbInternal(DEFAULT_ENDIANNESS);
+  public byte[] toWkb(String endianness) {

Review Comment:
   Makes sense - applied the suggestions, thanks!



##########
sql/api/src/main/scala/org/apache/spark/sql/functions.scala:
##########
@@ -11113,6 +11113,18 @@ object functions {
   def st_asbinary(geo: Column): Column =
     Column.fn("st_asbinary", geo)
 
+  /**
+   * Returns the input GEOGRAPHY or GEOMETRY value in WKB format using the 
specified endianness.
+   *
+   * @group st_funcs
+   * @since 4.2.0
+   */
+  def st_asbinary(geo: Column, endianness: Column): Column =
+    Column.fn("st_asbinary", geo, endianness)
+
+  def st_asbinary(geo: Column, endianness: String): Column =
+    Column.fn("st_asbinary", geo, lit(endianness))

Review Comment:
   Added.



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