nzw921rx commented on code in PR #12919:
URL: https://github.com/apache/seatunnel/pull/12919#discussion_r4403459201


##########
seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/utils/JdbcFieldTypeUtils.java:
##########
@@ -122,15 +134,45 @@ public static BigDecimal getBigDecimal(
      *
      * <p>PostgreSQL allows the special numeric values {@code NaN}, {@code 
Infinity} and {@code
      * -Infinity} (supported since PostgreSQL 14). This method reads the raw 
value as a string and
-     * reports whether it is one of those special values; it never throws.
+     * reports whether it is one of those special values. In the binary 
protocol the driver decodes
+     * the value for {@code getString} as well and fails on {@code Infinity} 
and {@code -Infinity},
+     * so the binary representation of the value is inspected instead. It 
never throws.
      */
     public static boolean isNumericSpecialValue(ResultSet resultSet, int 
columnIndex) {
         try {
             return 
isNumericSpecialValueString(resultSet.getString(columnIndex));
+        } catch (SQLException | RuntimeException e) {

Review Comment:
   The scope of exception capture here is relatively wide, and I think 
PostgreSQL's special handling should not change the behavior of the underlying 
classes
   



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

Reply via email to