1
0

[HUDI-3185] HoodieConfig#getBoolean should return false when default not set (#4536)

Remove unnecessary config
This commit is contained in:
Sagar Sumit
2022-01-08 02:50:11 +05:30
committed by GitHub
parent 2e561defe9
commit 518488c633
2 changed files with 21 additions and 1 deletions

View File

@@ -146,6 +146,9 @@ public class HoodieConfig implements Serializable {
}
public <T> Boolean getBoolean(ConfigProperty<T> configProperty) {
if (configProperty.hasDefaultValue()) {
return getBooleanOrDefault(configProperty);
}
Option<Object> rawValue = getRawValue(configProperty);
return rawValue.map(v -> Boolean.parseBoolean(v.toString())).orElse(null);
}