[
https://issues.apache.org/jira/browse/NIFI-5316?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16520550#comment-16520550
]
Bryan Bende commented on NIFI-5316:
-----------------------------------
Been looking into this, so far it looks like the issue is that Parquet's Avro
related-code will return List.class when the Avro type is an array, this
results in the value of the field return from Parquet's Avro reader being an
ArrayList which NiFi is not expecting, NiFi's conversion code is expecting
GenericData.Array<?>.
There would be two potential solutions and I haven't decided which is the best
way yet. The first would be to just update NiFI's conversion code in two places
so that when it looks at an array, or a union with an array in it, it will
correctly handle when the value is an ArrayList. The second would be to see if
we can alter something in the configuration of Parquet's Avro reader so that it
doesn't use ArrayList (not sure if this is possible yet, have been debugging
into Parquet code).
> Potential bug with Fetch Parquet
> --------------------------------
>
> Key: NIFI-5316
> URL: https://issues.apache.org/jira/browse/NIFI-5316
> Project: Apache NiFi
> Issue Type: Bug
> Affects Versions: 1.6.0
> Reporter: Robert Bruno
> Priority: Major
>
> I have used PutParquet to create Parquet files from Nifi Records. In trying
> to convert the parquet back to json by using FetchParquet, I keep getting
> errors on what seems like any array field. I have had successes on data that
> contained no arrays.
> The error in the log is cannont convert a value [xxx, yyy] where xxx and yyy
> are random strings of type class java.util.ArrayList because no compatible
> type exist in the UNION of field z.
> I am also see the same error when the value is [] (empty array) as well.
> I have been successful gong from json to avro and avro to json with the same
> schema registry values.
> I am defining array fields as follows:
> "type" : [
> "null",
> {
> "type" : "array",
> "items" : "string"
> }
> ],
> "default": null
> }
>
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)