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

Matt Burgess commented on NIFI-3076:
------------------------------------

This is related to NIFI-1319, except that in this case, the driver is returning 
Integer type and an Integer object. For full-size integers, drivers often 
return Integer type with a Long object if the integer is unsigned (which was 
the basis for NIFI-1319), but for various integer types this is not always the 
case.

A couple of possible approaches:

1) Check the precision of the column, and select "int" or "long" accordingly 
(similar to the solution in NIFI-2531) when creating the schema
2) Check the row's value for that column, and cast to Long if necessary.

I prefer #1 but wanted to bring up both options I thought of (and of course 
other proposals are welcome too)

> ExecuteSQL error when table uses unsigned MEDIUMINT
> ---------------------------------------------------
>
>                 Key: NIFI-3076
>                 URL: https://issues.apache.org/jira/browse/NIFI-3076
>             Project: Apache NiFi
>          Issue Type: Bug
>          Components: Extensions
>            Reporter: Matt Burgess
>
> When using a MySQL table with a column defined as an unsigned MEDIUMINT, the 
> following error occurs:
> ExecuteSQL[id=fa363402-bbc0-1802-ffff-ffff96aa31f4] 
> ExecuteSQL[id=fa363402-bbc0-1802-ffff-ffff96aa31f4] failed to process session 
> due to org.apache.avro.file.DataFileWriter$AppendWriteException: 
> org.apache.avro.UnresolvedUnionException: Not in union ["null","long"]: 
> 141419: org.apache.avro.file.DataFileWriter$AppendWriteException: 
> org.apache.avro.UnresolvedUnionException: Not in union ["null","long"]: 141419



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to