cloud-fan commented on code in PR #54328:
URL: https://github.com/apache/spark/pull/54328#discussion_r2817621314


##########
sql/catalyst/src/main/java/org/apache/spark/sql/catalyst/util/Geography.java:
##########
@@ -185,4 +188,11 @@ private ByteBuffer getWrapper() {
     return ByteBuffer.wrap(getBytes()).order(DEFAULT_ENDIANNESS);
   }
 
+  // Validates that the given SRID is supported for GEOGRAPHY values.
+  private static void validateSrid(int srid) {
+    if (!GeographyType.isSridSupported(srid)) {
+      throw new IllegalArgumentException("Unsupported SRID value: " + srid);

Review Comment:
   We need to indicate this is a system error, or the caller side should 
rethrow the error with error condition name.
   
   We can use `SparkRuntimeException` and manually specify error condition name 
as `INTERNAL_ERROR`



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