MikeThomsen commented on a change in pull request #3410: NIFI-6100 Use setBytes 
in JdbcCommon for binary types
URL: https://github.com/apache/nifi/pull/3410#discussion_r286399239
 
 

 ##########
 File path: 
nifi-nar-bundles/nifi-extension-utils/nifi-database-utils/src/main/java/org/apache/nifi/util/db/JdbcCommon.java
 ##########
 @@ -807,7 +807,7 @@ public static void setParameter(final PreparedStatement 
stmt, final String attrN
                             throw new ParseException("Unable to parse binary 
data using the formatter `" + valueFormat + "`.",0);
                     }
 
-                    stmt.setBinaryStream(parameterIndex, new 
ByteArrayInputStream(bValue), bValue.length);
+                    stmt.setBytes(parameterIndex, bValue);
 
 Review comment:
   That would require us to have a compile time dependency on the phoenix 
driver to be able to reference `PhoenixPreparedStatement` with `instanceof`.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to