szehon-ho commented on code in PR #52858:
URL: https://github.com/apache/spark/pull/52858#discussion_r2493660395
##########
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:
nit: can we simplify 'fromWKB' above by this new method?
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/errors/QueryExecutionErrors.scala:
##########
@@ -665,6 +665,17 @@ private[sql] object QueryExecutionErrors extends
QueryErrorsBase with ExecutionE
summary = "")
}
+ def stInvalidSridValueError(srid: String): SparkIllegalArgumentException = {
Review Comment:
is this used somewhere? why not just inline with the other method to avoid
exposing another version of 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]