New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HIVE-24436: Fix Avro NULL_DEFAULT_VALUE compatibility issue #1715
Conversation
if (schemaField.schema().getType() == Schema.Type.RECORD) { | ||
for (Schema.Field field : schemaField.schema().getFields()) { | ||
fields.add(new Schema.Field(field.name(), field.schema(), field.doc(), nullDefault)); | ||
} | ||
} else { | ||
fields.add(new Schema.Field(schemaField.name(), schemaField.schema(), schemaField.doc(), | ||
nullDefault)); | ||
nullDefault)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks @wangyum !
return new Schema.Field(name, createAvroSchema(typeInfo), comment, JsonProperties.NULL_VALUE); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the fix, @wangyum and all. The patch looks reasonable and safe to me too.
BTW, all of 25 failures are irrelevant?
Existing failures - 25
Yes @dongjoon-hyun , these test failures have been there since 2.3.7 release. I do plan to take a look at them later. @wangyum I believe the issue exists in the master branch as well? if so, can we make this PR against the master and backport to branch-2.3/branch-3.1 later once that is merged? |
This is for master branch: #1722 |
Closing this one since #1722 is merged and backported to branch-2.3 |
What changes were proposed in this pull request?
This pr replace
null
withJsonProperties.NULL_VALUE
to fix compatibility issue:Why are the changes needed?
For compatibility with Avro 1.9.x and Avro 1.10.0.
Does this PR introduce any user-facing change?
No.
How was this patch tested?
Build and run Spark test: