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?


---
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