nsivabalan commented on code in PR #19205:
URL: https://github.com/apache/hudi/pull/19205#discussion_r3654538557


##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/config/HoodieWriteConfig.java:
##########
@@ -3611,15 +3619,20 @@ public Builder withCanIgnorePostCommitFailures(boolean 
canIgnorePostCommitFailur
       return this;
     }
 
+    /**
+     * @deprecated since 1.3.0, use {@link 
#withMetaFieldsMode(MetaFieldsMode)} instead
+     * ({@code true} maps to {@link MetaFieldsMode#ALL}, {@code false} to 
{@link MetaFieldsMode#NONE}).
+     */
+    @Deprecated

Review Comment:
   Agreed on the principle, and you're right that it's pre-existing rather than 
introduced here — `withPopulateMetaFields` has set 
`HoodieTableConfig.POPULATE_META_FIELDS` through the write-config builder since 
well before this patch (it's on master today at the same line). 
`withMetaFieldsMode` follows the established pattern for the same property 
family, so I'd rather not diverge one config from its sibling inside this PR.
   
   On the immutability concern specifically: the write config is the *input* to 
table creation, not a mutation channel for an existing table. Once a table 
exists, a differing value is rejected rather than applied — 
`BaseHoodieWriteClient.validateAgainstTableProperties` now compares the full 
`MetaFieldsMode` (strengthened in 
[`c266b82`](https://github.com/apache/hudi/pull/19205/commits/c266b8286b4e) for 
your other P1), and `HoodieWriterUtils.validateTableConfig` blocks the 
datasource path. So the builder can express an intended mode, but it cannot 
silently change one on disk.
   
   That said, the broader cleanup you're pointing at — write-config builders 
shouldn't carry table-config setters at all — seems worth doing properly across 
all of them rather than piecemeal. Happy to file a follow-up JIRA for that 
sweep if you think it's worth tracking; it would cover the existing 
`POPULATE_META_FIELDS` setter too, which is the one with real callers today.



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