Github user bbende commented on the issue:

    https://github.com/apache/nifi/pull/823
  
    Tested this out with MySQL, created a table like the following:
    
    ```
    mysql> CREATE TABLE BIGINT_TEST (id bigint(20) unsigned, name varchar(255));
    Query OK, 0 rows affected (0.02 sec)
    
    mysql> insert into BIGINT_TEST (id, name) values (22222222222222222222, 
"test");
    Query OK, 1 row affected, 1 warning (0.00 sec)
    
    mysql> select * from BIGINT_TEST;
    +----------------------+------+
    | id                   | name |
    +----------------------+------+
    | 18446744073709551615 | test |
    +----------------------+------+
    1 row in set (0.00 sec)
    ```
    Verified I got the error before your patch, then applied it and got a 
different error:
    
    ```
    java.lang.ArithmeticException: BigInteger out of long range
        at java.math.BigInteger.longValueExact(BigInteger.java:4383) 
~[na:1.8.0_74]
        at 
org.apache.nifi.processors.standard.util.JdbcCommon.convertToAvroStream(JdbcCommon.java:125)
 ~[na:na]
    ```
    
    I understand there isn't much we can do here because the value is too big 
for a long, but would we better off representing BIGINT as a string in the 
schema and output so that we never run into an error? 
    
    I realize we lose the typing then, but not sure if having some of the data 
typed and some with errors is better or worse.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to