Hisoka-X commented on code in PR #9305:
URL: https://github.com/apache/seatunnel/pull/9305#discussion_r2084511319


##########
seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/utils/JdbcFieldTypeUtils.java:
##########
@@ -56,6 +56,21 @@ public static Double getDouble(ResultSet resultSet, int 
columnIndex) throws SQLE
     }
 
     public static String getString(ResultSet resultSet, int columnIndex) 
throws SQLException {
+        Object obj = resultSet.getObject(columnIndex);
+        if (obj == null) {
+            return null;
+        }
+
+        // Add special handling for the BLOB data type.
+        if (obj instanceof java.sql.Blob) {
+            java.sql.Blob blob = (java.sql.Blob) obj;
+            try {
+                byte[] bytes = blob.getBytes(1, (int) blob.length());
+                return new String(bytes, 
java.nio.charset.StandardCharsets.UTF_8);
+            } finally {
+                blob.free();

Review Comment:
   +1 



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