You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by GitBox <gi...@apache.org> on 2022/03/27 19:50:54 UTC

[GitHub] [nifi] MikeThomsen commented on a change in pull request #5900: NIFI-7234 Standardized on Avro 1.11.0

MikeThomsen commented on a change in pull request #5900:
URL: https://github.com/apache/nifi/pull/5900#discussion_r835953933



##########
File path: nifi-nar-bundles/nifi-extension-utils/nifi-record-utils/nifi-avro-record-utils/src/main/java/org/apache/nifi/avro/AvroTypeUtil.java
##########
@@ -326,7 +326,7 @@ private static Schema nullable(final Schema schema) {
             return Schema.createUnion(unionTypes);
         }
 
-        return Schema.createUnion(Schema.create(Type.NULL), schema);
+        return Schema.createUnion(schema, Schema.create(Type.NULL));

Review comment:
       Changed this and our test schemas per this line in the Avro Specification:
   
   > default: A default value for this field, only used when reading instances that lack the field for schema evolution purposes. The presence of a default value does not make the field optional at encoding time. Permitted values depend on the field's schema type, according to the table below. **Default values for union fields correspond to the first schema in the union**.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org