yihua commented on a change in pull request #5173:
URL: https://github.com/apache/hudi/pull/5173#discussion_r839137184



##########
File path: 
hudi-client/hudi-spark-client/src/main/java/org/apache/hudi/client/SparkRDDWriteClient.java
##########
@@ -428,11 +428,13 @@ private void updateTableMetadata(HoodieTable table, 
HoodieCommitMetadata commitM
   }
 
   @Override
-  protected HoodieTable doInitTable(HoodieTableMetaClient metaClient, 
Option<String> instantTime) {
-    // Initialize Metadata Table to make sure it's bootstrapped _before_ the 
operation,
-    // if it didn't exist before
-    // See https://issues.apache.org/jira/browse/HUDI-3343 for more details
-    initializeMetadataTable(instantTime);
+  protected HoodieTable doInitTable(HoodieTableMetaClient metaClient, 
Option<String> instantTime, boolean initialMetadataTableIfNecessary) {
+    if (initialMetadataTableIfNecessary) {
+      // Initialize Metadata Table to make sure it's bootstrapped _before_ the 
operation,
+      // if it didn't exist before
+      // See https://issues.apache.org/jira/browse/HUDI-3343 for more details
+      initializeMetadataTable(instantTime);
+    }
 
     // Create a Hoodie table which encapsulated the commits and files visible
     return HoodieSparkTable.create(config, (HoodieSparkEngineContext) context, 
metaClient, config.isMetadataTableEnabled());

Review comment:
       Per discussion, there is no change required 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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to