danny0405 commented on code in PR #18384:
URL: https://github.com/apache/hudi/pull/18384#discussion_r3279928473


##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/client/BaseHoodieTableServiceClient.java:
##########
@@ -795,6 +795,11 @@ protected HoodieTable 
createTableAndValidate(HoodieWriteConfig config,
     if (!skipValidation) {
       
CommonClientUtils.validateTableVersion(table.getMetaClient().getTableConfig(), 
config);
     }
+    // Overlay the persisted POPULATE_META_FIELDS and META_FIELDS_EXCLUDE_LIST 
onto the
+    // shared writer config so table services (clustering/compaction/clean) 
see the on-disk
+    // state. Safe to mutate in place: these properties are immutable for the 
lifetime of
+    // the table. Mirrors the same step in 
BaseHoodieWriteClient.createTableAndValidate.
+    table.getMetaClient().getTableConfig().overlayMetaFieldProps(config);

Review Comment:
   The changes looks not that bad, and we can pass around just the 
HoodieTableConfig instead of the whole hoodieTable or meta client in several 
APIs.
   
   Another reason we can not do this is not every engine confine the initiation 
of the write confing in the hoodie table creation, in Flink, the write config 
is initialized seprately from different task's write client, another simpler 
way is we fetch the hoodie.properties in the HoodieWriteConfig 
builder/construction and override the options from there, that would be the 
smallest change.



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