danny0405 commented on code in PR #19858:
URL: https://github.com/apache/hudi/pull/19858#discussion_r3964516441
##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/configuration/OptionsResolver.java:
##########
@@ -565,10 +566,14 @@ public static boolean readCDCFromChangelog(Configuration
conf) {
* Returns whether to populate meta fields or not
*/
public static boolean isPopulateMetaFields(Configuration conf) {
- return Boolean.parseBoolean(
- conf.getString(
- HoodieTableConfig.POPULATE_META_FIELDS.key(),
- HoodieTableConfig.POPULATE_META_FIELDS.defaultValue().toString()));
+ return getMetaFieldsMode(conf).toLegacyPopulateMetaFields();
+ }
+
+ /**
+ * Resolves meta-field population, including the legacy boolean fallback.
+ */
+ public static MetaFieldsMode getMetaFieldsMode(Configuration conf) {
+ return MetaFieldsMode.resolve(conf.toMap());
Review Comment:
OptionsResolver.isPopulateMetaFields() currently has no production callers.
The only production caller of getMetaFieldsMode() is
StreamerUtil.initTableIfNotExists(), inside the new-table initialization
branch; it is not called there for an existing table. The existing-table write
path resolves its mode through HoodieWriteConfig. We're keeping automatic
table-option inheritance out of this PR and have removed the proposed follow-up
change. This does not resolve the separate existing-table
configuration/validation concern raised 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]