nizhikov commented on code in PR #11518:
URL: https://github.com/apache/ignite/pull/11518#discussion_r1811351949


##########
modules/core/src/main/java/org/apache/ignite/internal/jdbc/thin/JdbcThinResultSet.java:
##########
@@ -1298,12 +1318,26 @@ else if (cls == String.class || cls == Character.class) 
{
 
     /** {@inheritDoc} */
     @Override public Blob getBlob(int colIdx) throws SQLException {
-        return new JdbcBlob(getBytes(colIdx));
+        Object val = getValue(colIdx);
+
+        if (val == null)
+            return null;
+
+        if (val instanceof JdbcBlobBuffer) {

Review Comment:
   Let's simplify a bit here:
   
   ```
        if (!(val instanceof JdbcBlobBuffer)) 
               throw new SQLException("Cannot convert to Blob [colIdx=" + 
colIdx + "]");
   
           return new JdbcBlob(JdbcBlobBuffer.shallowCopy((JdbcBlobBuffer)val));
   ```



-- 
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: notifications-unsubscr...@ignite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to