bvaradar commented on a change in pull request #3668:
URL: https://github.com/apache/hudi/pull/3668#discussion_r717230330



##########
File path: 
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/client/AbstractHoodieWriteClient.java
##########
@@ -213,6 +224,27 @@ protected void commit(HoodieTable table, String 
commitActionType, String instant
                       List<HoodieWriteStat> stats) throws IOException {
     LOG.info("Committing " + instantTime + " action " + commitActionType);
     HoodieActiveTimeline activeTimeline = table.getActiveTimeline();
+    // do save internal schema to support Implicitly add columns in write 
process
+    if 
(!metadata.getExtraMetadata().containsKey(InternalSchemaParser.LATESTSCHEMA) && 
metadata.getExtraMetadata().containsKey(SCHEMA_KEY)) {
+      TableSchemaResolver schemaUtils = new 
TableSchemaResolver(table.getMetaClient());
+      String historySchemaStr = 
schemaUtils.getTableHistorySchemaStrFromCommitMetadata().orElse("");
+      if (!historySchemaStr.isEmpty()) {

Review comment:
       @xiarixiaoyao : The synchronous metadata table support is still in the 
works and is getting ready. Its better to decouple both the projects and at the 
same time avoid adding historical schema to commit files. As an interim 
measure, lets write as separate files under .hoodie/schema and then we can do a 
follow up PR whenever synchronous metadata table is done.  cc @vinothchandar 
@codope 




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