cshuo commented on code in PR #19685:
URL: https://github.com/apache/hudi/pull/19685#discussion_r3877894039
##########
hudi-common/src/main/java/org/apache/hudi/common/config/HoodieStorageConfig.java:
##########
@@ -760,7 +765,11 @@ public Builder withParquetConfigInjectorClass(String
parquetConfigInjectorClass)
}
public HoodieStorageConfig build() {
- storageConfig.setDefaults(HoodieStorageConfig.class.getName());
+ // The Parquet codec default depends on the write engine. Leave it unset
here so that
+ // HoodieWriteConfig can resolve it after the final engine type is
known. This also preserves
+ // whether callers explicitly configured the codec when a partial
storage config is passed on.
+ storageConfig.setDefaults(HoodieStorageConfig.class.getName(),
Review Comment:
Fixed in bd9e6158b1f8. The codec is now declared with noDefaultValue(...)
and resolved by HoodieWriteConfig after the engine is known. Low-level tests
that bypass HoodieWriteConfig pass ZSTD explicitly.
##########
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:
Fixed in bd9e6158b1f8. Removed the excluded-properties setDefaults overload
and restored the standard HoodieStorageConfig build path.
--
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]