wangyum commented on a change in pull request #1715:
URL: https://github.com/apache/hive/pull/1715#discussion_r531391483
##########
File path:
serde/src/java/org/apache/hadoop/hive/serde2/avro/TypeInfoToSchema.java
##########
@@ -235,14 +236,14 @@ private Schema createAvroArray(TypeInfo typeInfo) {
private List<Schema.Field> getFields(Schema.Field schemaField) {
List<Schema.Field> fields = new ArrayList<Schema.Field>();
- JsonNode nullDefault = JsonNodeFactory.instance.nullNode();
+ JsonProperties.Null nullDefault = JsonProperties.NULL_VALUE;
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));
Review comment:
Related code:
https://github.com/apache/avro/blob/release-1.8.2/lang/java/avro/src/main/java/org/apache/avro/Schema.java#L421-L424
https://github.com/apache/avro/blob/release-1.8.2/lang/java/avro/src/main/java/org/apache/avro/util/internal/JacksonUtils.java#L57
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]