[jira] [Updated] (NIFI-9629) Avro Writer Schema Default Value not correctly being set
[ https://issues.apache.org/jira/browse/NIFI-9629?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pierre Villard updated NIFI-9629: - Fix Version/s: 1.16.0 Resolution: Fixed Status: Resolved (was: Patch Available) > Avro Writer Schema Default Value not correctly being set > > > Key: NIFI-9629 > URL: https://issues.apache.org/jira/browse/NIFI-9629 > Project: Apache NiFi > Issue Type: Bug > Components: Core Framework >Affects Versions: 1.15.0, 1.16.0, 1.15.1, 1.15.2, 1.15.3 > Environment: WSL Ubuntu, Java 11 Open JDK >Reporter: Nathan English >Assignee: Mark Payne >Priority: Major > Fix For: 1.16.0 > > Attachments: Avro_Default_Value_Conversion_Issue_-_20220125.xml > > Time Spent: 0.5h > Remaining Estimate: 0h > > 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 - {color:#FF}Error{color} > * Byte with null - {color:#FF}Error{color} > * Int with 0 Default value - OK > * Long with 0 default value - {color:#FF}Error{color} > {color:#172b4d}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.{color} > {color:#172b4d}The attached flow successfully reproduces the errors.{color} > > {color:#172b4d}I have tested the flow and it successfully works in v1.12.1, > but not a build from the main branch.{color} > > {color:#172b4d}This issue leads on from NIFI-9594{color} -- This message was sent by Atlassian Jira (v8.20.1#820001)
[jira] [Updated] (NIFI-9629) Avro Writer Schema Default Value not correctly being set
[ https://issues.apache.org/jira/browse/NIFI-9629?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Mark Payne updated NIFI-9629: - Assignee: Mark Payne Status: Patch Available (was: Open) > Avro Writer Schema Default Value not correctly being set > > > Key: NIFI-9629 > URL: https://issues.apache.org/jira/browse/NIFI-9629 > Project: Apache NiFi > Issue Type: Bug > Components: Core Framework >Affects Versions: 1.15.3, 1.15.2, 1.15.1, 1.15.0, 1.16.0 > Environment: WSL Ubuntu, Java 11 Open JDK >Reporter: Nathan English >Assignee: Mark Payne >Priority: Major > Attachments: Avro_Default_Value_Conversion_Issue_-_20220125.xml > > Time Spent: 10m > Remaining Estimate: 0h > > 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 - {color:#FF}Error{color} > * Byte with null - {color:#FF}Error{color} > * Int with 0 Default value - OK > * Long with 0 default value - {color:#FF}Error{color} > {color:#172b4d}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.{color} > {color:#172b4d}The attached flow successfully reproduces the errors.{color} > > {color:#172b4d}I have tested the flow and it successfully works in v1.12.1, > but not a build from the main branch.{color} > > {color:#172b4d}This issue leads on from NIFI-9594{color} -- This message was sent by Atlassian Jira (v8.20.1#820001)