You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "Eric Secules (Jira)" <ji...@apache.org> on 2020/07/14 21:53:00 UTC

[jira] [Created] (NIFI-7637) ValidateRecord does not validate primative datatypes in an array

Eric Secules created NIFI-7637:
----------------------------------

             Summary: ValidateRecord does not validate primative datatypes in an array
                 Key: NIFI-7637
                 URL: https://issues.apache.org/jira/browse/NIFI-7637
             Project: Apache NiFi
          Issue Type: Bug
    Affects Versions: 1.11.4
            Reporter: Eric Secules


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)