Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
1.15.0, 1.16.0, 1.15.1, 1.15.2, 1.15.3
-
None
-
WSL Ubuntu, Java 11 Open JDK
Description
Using the Avro Record Set Writer to create fields that don't exist and set default values is currently causing issues. I haven't tested all the possible types, but below are the ones I have tested:
- String with string default value - OK
- String with null - Error
- Byte with null - Error
- Int with 0 Default value - OK
- Long with 0 default value - Error
Looking at the AvroTypeUtil class when the field is put with its default value the null, is actually an org.apache.avro.JsonProperties$Null instead of an actual null value. The long is actually a default of an int value. These both throw errors when being encoded to the Avro Format.
The attached flow successfully reproduces the errors.
I have tested the flow and it successfully works in v1.12.1, but not a build from the main branch.
This issue leads on from NIFI-9594
Attachments
Attachments
Issue Links
- links to