danny0405 commented on code in PR #19685:
URL: https://github.com/apache/hudi/pull/19685#discussion_r3877627193
##########
hudi-common/src/main/java/org/apache/hudi/common/config/HoodieConfig.java:
##########
@@ -133,14 +135,26 @@ private <T> Option<Object> getRawValue(ConfigProperty<T>
configProperty) {
}
protected void setDefaults(String configClassName) {
+ setDefaults(configClassName, Collections.emptySet());
+ }
+
+ /**
+ * Sets defaults declared by the given config class, except for properties
whose defaults need
+ * to be resolved by a higher-level config with additional context.
+ *
+ * @param configClassName config class declaring the properties
+ * @param excludedProperties properties to leave unset
+ */
+ protected void setDefaults(String configClassName, Set<ConfigProperty<?>>
excludedProperties) {
Review Comment:
This broadens the base configuration API so callers can selectively suppress
declared defaults, but the only use is the Parquet codec special case. That
makes default application dependent on every call site remembering the
exclusion and permits a ConfigProperty to advertise a default that its owning
builder does not apply. If the codec is declared with noDefaultValue plus its
documented engine-specific default and resolved in HoodieWriteConfig, this
overload and the new collection imports can be removed entirely.
--
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]