Details
-
Bug
-
Status: Resolved
-
Critical
-
Resolution: Fixed
-
0.4.0, 0.4.1
-
None
-
None
Description
In 0.4.0 we condensed a big case statement in PutSQL down to this (around line 728):
stmt.setObject(parameterIndex, parameterValue, jdbcType);
If we send a String as parameterValue, with a jdbcType of 4 which is “int”, this Phoenix method which doesn’t like that:
https://github.com/apache/phoenix/blob/master/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixPreparedStatement.java#L439
Before we had:
case Types.INTEGER: stmt.setInt(parameterIndex, Integer.parseInt(parameterValue)); break;
So it worked because Phoenix didn’t have to do any conversion. We need to consider going back to explicitly converting the string like we were doing before.
Attachments
Issue Links
- relates to
-
NIFI-1241 PutSQL does not support Boolean, Numeric, or Decimal data types
- Resolved