[
https://issues.apache.org/jira/browse/NIFI-4031?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16050812#comment-16050812
]
ASF GitHub Bot commented on NIFI-4031:
--------------------------------------
Github user markap14 commented on the issue:
https://github.com/apache/nifi/pull/1895
Hey @champagst sorry for the delay in getting this reviewed. I think the
solution that you provided here will work for this use case, but I'm a little
bit concerned with this approach. I say that because if a field has a type of
ARRAY, then the object should be array, not a List. Avro, however, comes with
some oddities, and so in the AvroTypeUtil class, there is a method named
isCompatibleDataType(). It checks if the "avro form" of an object is compatible
with a given data type. So I think this is where we should add this logic.
Adding it to DataTypeUtils may result in a different writer expecting an array
but getting a List object. If we instead just update
AvroTypeUtil#isCompatibleDataType to allow for a List in the case of Arrays,
then I think we will still have the desired outcome but will prevent passing
List objects around generically for ARRAY data types. Does that make sense?
> Nullable Array
> --------------
>
> Key: NIFI-4031
> URL: https://issues.apache.org/jira/browse/NIFI-4031
> Project: Apache NiFi
> Issue Type: Bug
> Reporter: Steve Champagne
> Attachments: NullableArray.xml
>
>
> I'm getting an error when I try to use a nullable array. I've attached an
> example template.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)