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


##########
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:
   Checked Exceptions will require catching them and/or declaring throws across 
the call chain. I don't think we need to do this, IllegalArgumentException is 
simpler and should serve the purpose just as well here. What do you think?



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