Uploaded image for project: 'Apache NiFi'
  1. Apache NiFi
  2. NIFI-7637

ValidateRecord does not validate datatypes in an array

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 1.13.0
    • None
    • None

    Description

      Given this input record

      {
          "numbers":[{"foo":1},"2",3,"ASD"]
      }
      

      and this Avro schema

      {
        "name": "MyClass",
        "type": "record",
        "namespace": "com.acme.avro",
        "fields": [
          {
            "name": "numbers",
            "type": {
              "type": "array",
              "items": "int"
            }
          }
        ]
      }
      

      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.

      Attachments

        Issue Links

          Activity

            People

              mattyb149 Matt Burgess
              esecules Eric Secules
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 0.5h
                  0.5h