You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by "Bryan Bende (JIRA)" <ji...@apache.org> on 2015/12/23 19:10:46 UTC
[jira] [Resolved] (NIFI-1328) PutSQL Error Inserting an integer to
a Phoenix table
[ https://issues.apache.org/jira/browse/NIFI-1328?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Bryan Bende resolved NIFI-1328.
-------------------------------
Resolution: Fixed
> PutSQL Error Inserting an integer to a Phoenix table
> ----------------------------------------------------
>
> Key: NIFI-1328
> URL: https://issues.apache.org/jira/browse/NIFI-1328
> Project: Apache NiFi
> Issue Type: Bug
> Affects Versions: 0.4.0, 0.4.1
> Reporter: Bryan Bende
> Assignee: Bryan Bende
> Priority: Critical
> Fix For: 0.5.0
>
>
> In 0.4.0 we condensed a big case statement in PutSQL down to this (around line 728):
> {code}
> stmt.setObject(parameterIndex, parameterValue, jdbcType);
> {code}
> 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:
> {code}
> case Types.INTEGER:
> stmt.setInt(parameterIndex, Integer.parseInt(parameterValue));
> break;
> {code}
> 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.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)