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


##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/config/HoodieCleanConfig.java:
##########
@@ -77,9 +80,9 @@ public class HoodieCleanConfig extends HoodieConfig {
       .withDocumentation(HoodieCleaningPolicy.class)
       .markAdvanced()
       .withInferFunction(cfg -> {
-        boolean isCommitsRetainedConfigured = 
cfg.contains(CLEANER_COMMITS_RETAINED_KEY);
-        boolean isHoursRetainedConfigured = 
cfg.contains(CLEANER_HOURS_RETAINED_KEY);
-        boolean isFileVersionsRetainedConfigured = 
cfg.contains(CLEANER_FILE_VERSIONS_RETAINED_KEY);
+        boolean isCommitsRetainedConfigured = 
cfg.contains(CLEANER_COMMITS_RETAINED_KEY) || 
cfg.contains(CLEANER_COMMITS_RETAINED_ALTERNATIVE_KEY);

Review Comment:
   if you have added alternatives below, config.contains should take care of 
it. 
   ```   public static <T> boolean contains(ConfigProperty<T> configProperty, 
HoodieConfig config) {
       if (config.getProps().containsKey(configProperty.key())) {
         return true;
       }
       return configProperty.getAlternatives().stream().anyMatch(k -> 
config.getProps().containsKey(k));
     }
   ```
   
   So, we don't need to fix this on top of it. 



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