Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
Description
- Consider the following description:
- Record R1 {
- fields : {[
- {
- Union : [
- null,
- Record R2 {
- fields : {[
- {
* String S1
*. default: String S3
* }
, {
- String S2
- }
- ]}
- }
- }
- ]}
- }
- will be flattened to:
- Record R1 {
- fields : {[
- {
* Union : [ null, String S1]
*. default: String S3
* }
, {
- Union : [ null, String S2]
- }
- ]}
- }
Due to the addition of the AvroCompatibilityHelper, Avro flattening can run into an issue in the above scenario due to the nested non-null default S3 since the default type needs to be the first type in the field order. So R1 should have field S1 as Union [String S1, null]