uros-db commented on code in PR #52858:
URL: https://github.com/apache/spark/pull/52858#discussion_r2493691223
##########
sql/catalyst/src/main/java/org/apache/spark/sql/catalyst/util/Geography.java:
##########
@@ -162,7 +162,20 @@ public byte[] toEwkt() {
@Override
public int srid() {
// This method gets the SRID value from the in-memory Geography
representation header.
- return
ByteBuffer.wrap(getBytes()).order(DEFAULT_ENDIANNESS).getInt(SRID_OFFSET);
+ return getWrapper().getInt(SRID_OFFSET);
+ }
+
+ @Override
+ public void setSrid(int srid) {
Review Comment:
`fromWKB` is a bit different - it creates a new byte array and wraps it
before creating the geo object. We could make the getWrapper more general to
accommodate both call-sites, but I don't think it's really necessary - there's
not much benefit to it.
--
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]