xiarixiaoyao commented on code in PR #9984:
URL: https://github.com/apache/hudi/pull/9984#discussion_r1382534301


##########
hudi-common/src/main/java/org/apache/hudi/common/util/InternalSchemaCache.java:
##########
@@ -217,7 +217,11 @@ public static InternalSchema 
getInternalSchemaByVersionId(long versionId, String
     }
     InternalSchema fileSchema = InternalSchemaUtils.searchSchema(versionId, 
SerDeHelper.parseSchemas(latestHistorySchema));
     // step3:
-    return fileSchema.isEmptySchema() ? 
AvroInternalSchemaConverter.convert(HoodieAvroUtils.addMetadataFields(new 
Schema.Parser().parse(avroSchema))) : fileSchema;
+    return fileSchema.isEmptySchema()
+           ? (StringUtils.isNullOrEmpty(avroSchema)
+             ? InternalSchema.getEmptyInternalSchema()
+             : 
AvroInternalSchemaConverter.convert(HoodieAvroUtils.addMetadataFields(new 
Schema.Parser().parse(avroSchema))))
+           : fileSchema;

Review Comment:
   thanks for your fix.  
   why avro schema is null here ?



-- 
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: commits-unsubscr...@hudi.apache.org

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

Reply via email to