xiarixiaoyao commented on a change in pull request #3808:
URL: https://github.com/apache/hudi/pull/3808#discussion_r740694727



##########
File path: 
hudi-common/src/main/java/org/apache/hudi/common/table/TableSchemaResolver.java
##########
@@ -493,4 +496,51 @@ public static MessageType readSchemaFromLogFile(FileSystem 
fs, Path path) throws
     }
     return null;
   }
+
+  /**
+   * Gets the InternalSchema for a hoodie table from the HoodieCommitMetadata 
of the instant.
+   *
+   * @return InternalSchema for this table
+   */
+  public Option<InternalSchema> getTableInternalSchemaFromCommitMetadata() {
+    HoodieTimeline timeline = 
metaClient.getActiveTimeline().getCommitsTimeline().filterCompletedInstants();

Review comment:
       
   I feel OK。 Just a little performance  worried,  as historySchema will 
gradually increase,   read from commit file has better performance than read 
from FileBaseInternalSchemasManager.




-- 
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]


Reply via email to