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

ASF subversion and git services commented on NIFI-7637:
-------------------------------------------------------

Commit 4fee07656169e4f1df723ad5e5b8769dddcfdb04 in nifi's branch 
refs/heads/main from Matt Burgess
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=4fee076 ]

NIFI-7637: Ensure all array elements are compatible in 
DataTypeUtils.isArrayTypeCompatible() (#4612)



> ValidateRecord does not validate datatypes in an array
> ------------------------------------------------------
>
>                 Key: NIFI-7637
>                 URL: https://issues.apache.org/jira/browse/NIFI-7637
>             Project: Apache NiFi
>          Issue Type: Bug
>            Reporter: Eric Secules
>            Assignee: Matt Burgess
>            Priority: Major
>             Fix For: 1.13.0
>
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> Given this input record
> {code:java}
> {
>     "numbers":[{"foo":1},"2",3,"ASD"]
> }
> {code}
> and this Avro schema
> {code:java}
> {
>   "name": "MyClass",
>   "type": "record",
>   "namespace": "com.acme.avro",
>   "fields": [
>     {
>       "name": "numbers",
>       "type": {
>         "type": "array",
>         "items": "int"
>       }
>     }
>   ]
> }
> {code}
> *Expected Results*
> I would expect the record to fail validation even with strict type checking 
> turned off. Because the content of the array cannot all be treated as an 
> integer.
> *Actual Results*
> The record gets routed a flowfile on the success relationship.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to