voonhous commented on code in PR #17535:
URL: https://github.com/apache/hudi/pull/17535#discussion_r2609102335
##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/table/HoodieTable.java:
##########
@@ -952,9 +952,10 @@ public void validateSchema() throws HoodieUpsertException,
HoodieInsertException
if (!existingTableSchema.isPresent()) {
return;
}
- Schema writerSchema =
HoodieAvroUtils.createHoodieWriteSchema(config.getSchema());
- Schema tableSchema =
HoodieAvroUtils.createHoodieWriteSchema(existingTableSchema.get());
- AvroSchemaUtils.checkSchemaCompatible(tableSchema, writerSchema,
shouldValidate, allowProjection, getDropPartitionColNames());
+
+ HoodieSchema writerSchema =
HoodieSchemaUtils.createHoodieWriteSchema(config.getSchema(), false);
+ HoodieSchema tableSchema =
HoodieSchema.createHoodieWriteSchema(existingTableSchema.get().toString(),
false);
Review Comment:
It invokes
`org.apache.hudi.avro.HoodieAvroUtils#addMetadataFields(org.apache.avro.Schema,
boolean)`, I don't think we need a new method, let's just call
`org.apache.hudi.common.schema.HoodieSchemaUtils#addMetadataFields(org.apache.hudi.common.schema.HoodieSchema)`.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]