voonhous commented on code in PR #17659:
URL: https://github.com/apache/hudi/pull/17659#discussion_r2672977636
##########
hudi-common/src/main/java/org/apache/hudi/common/table/TableSchemaResolver.java:
##########
@@ -107,185 +104,117 @@ public TableSchemaResolver(HoodieTableMetaClient
metaClient) {
this.hasOperationField = Lazy.lazily(this::hasOperationField);
}
- public Schema getTableAvroSchemaFromDataFile() throws Exception {
- return
getTableAvroSchemaFromDataFileInternal().orElseThrow(schemaNotFoundError());
- }
-
/**
* Gets full schema (user + metadata) for a hoodie table from data file as
HoodieSchema.
- * Delegates to getTableAvroSchemaFromDataFile and wraps the result in a
HoodieSchema.
*
* @return HoodieSchema for this table from data file
* @throws Exception
*/
public HoodieSchema getTableSchemaFromDataFile() throws Exception {
- Schema avroSchema = getTableAvroSchemaFromDataFile();
- return HoodieSchema.fromAvroSchema(avroSchema);
+ return
getTableSchemaFromDataFileInternal().orElseThrow(schemaNotFoundError());
}
- private Option<Schema> getTableAvroSchemaFromDataFileInternal() {
+ private Option<HoodieSchema> getTableSchemaFromDataFileInternal() {
return getTableParquetSchemaFromDataFile();
}
/**
- * Gets full schema (user + metadata) for a hoodie table as HoodieSchema.
- * Delegates to getTableAvroSchema and wraps the result in a HoodieSchema.
+ * Gets full schema (user + metadata) for a hoodie table.
*
- * @return HoodieSchema for this table
+ * @return Avro schema for this table
Review Comment:
Done
--
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]