You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2019/04/01 20:43:06 UTC

[jira] [Commented] (NIFI-6117) DataTypeUtils.isBigIntTypeCompatible always returns false

    [ https://issues.apache.org/jira/browse/NIFI-6117?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16807165#comment-16807165 ] 

ASF subversion and git services commented on NIFI-6117:
-------------------------------------------------------

Commit 0255874f9fdc5357a9dfd61f347e07d8ee4e4cb5 in nifi's branch refs/heads/NIFI-6169-RC1 from Matt Burgess
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=0255874 ]

NIFI-6117: Fix BIGINT handling in DataTypeUtils


> DataTypeUtils.isBigIntTypeCompatible always returns false
> ---------------------------------------------------------
>
>                 Key: NIFI-6117
>                 URL: https://issues.apache.org/jira/browse/NIFI-6117
>             Project: Apache NiFi
>          Issue Type: Bug
>            Reporter: Koji Kawamura
>            Assignee: Koji Kawamura
>            Priority: Major
>             Fix For: 1.10.0, 1.9.2
>
>          Time Spent: 1h 20m
>  Remaining Estimate: 0h
>
> Because it checks null value wrongly:
> {code:java}
>     public static boolean isBigIntTypeCompatible(final Object value) {
>         return value == null && (value instanceof BigInteger || value instanceof Long);
>     }
> {code}
> should be:
> {code:java}
>     public static boolean isBigIntTypeCompatible(final Object value) {
>         // We need something similar to isIntegral, but the value can be larger than the max long.
>         return isNumberTypeCompatible(value, s -> somethingSimilarToIsIntegral(s))
>     }
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)