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

Matt Burgess commented on NIFI-5515:
------------------------------------

Turns out this will cause problems as NiFi Record types are all signed (so is 
Avro which we currently use for the schema). No solution would really be 
complete and I don't think we want to "half-support" unsigned values across 
NiFi. I looked at Debezium as well and they don't appear to support unsigned 
types either (except TINYINT(1) UNSIGNED which can be converted to a boolean).

> [CaptureChangeMysql] Cannot get real value of primitive type when column type 
> is unsigned.
> ------------------------------------------------------------------------------------------
>
>                 Key: NIFI-5515
>                 URL: https://issues.apache.org/jira/browse/NIFI-5515
>             Project: Apache NiFi
>          Issue Type: Bug
>          Components: Extensions
>    Affects Versions: 1.6.0
>            Reporter: ashwin konale
>            Priority: Minor
>
> *Processor: CaptureChangeMysql*
> When mysql column type is of unsigned primitive type, CaptureChangeMysql is 
> not able to read the data properly when the value overflows. I investigated a 
> bit and came across this 
> ([https://github.com/shyiko/mysql-binlog-connector-java/issues/104|https://github.com/shyiko/mysql-binlog-connector-java/issues/104]).
>  The library which is internally being used in CaptureChangeMysql Processor 
> ([https://github.com/shyiko/mysql-binlog-connector-java|https://github.com/shyiko/mysql-binlog-connector-java])
>  does not handle this case and its upto consumer to handle it. More 
> description can be found in the link.
> *Issue summary Eg.* 
> Column type : unsigned tinyint
> Actual value : 128
> Value from CaptureChangeMysql: -128 (Because its still 8bits storage and 
> mostsignificant bit is identified as sign from java.)
> *Possible solution:*
> Column types are read and stored Distributed Map Cache Client so we should be 
> able to do these conversions.
> Nifi version : 1.6.0
> Mysql version : 5.7.22-log
> Binlog type. : Row-based logging



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to