pengzhiwei2018 commented on a change in pull request #2334:
URL: https://github.com/apache/hudi/pull/2334#discussion_r551699383



##########
File path: 
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/table/HoodieTable.java
##########
@@ -574,9 +574,8 @@ private void validateSchema() throws HoodieUpsertException, 
HoodieInsertExceptio
     Schema writerSchema;
     boolean isValid;
     try {
-      TableSchemaResolver schemaUtil = new 
TableSchemaResolver(getMetaClient());
       writerSchema = 
HoodieAvroUtils.createHoodieWriteSchema(config.getSchema());
-      tableSchema = 
HoodieAvroUtils.createHoodieWriteSchema(schemaUtil.getTableAvroSchemaWithoutMetadataFields());
+      tableSchema = getTableSchema(config, true);

Review comment:
       Hi @nsivabalan ,here `createHoodieWriteSchema` will add the meta fields 
to the schema, so the `tableSchema` should also have the meta fields 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.

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


Reply via email to