lasdf1234 commented on code in PR #12751:
URL: https://github.com/apache/gravitino/pull/12751#discussion_r3904058467


##########
core/src/main/java/org/apache/gravitino/catalog/OperationDispatcher.java:
##########
@@ -142,24 +141,17 @@ protected <R, E1 extends Throwable, E2 extends Throwable> 
R doWithCatalog(
     }
   }
 
-  protected Set<String> getHiddenPropertyNames(
+  protected Map.Entry<Set<String>, Set<String>> getHiddenPropertyNames(
       NameIdentifier catalogIdent,
       ThrowableFunction<HasPropertyMetadata, PropertiesMetadata> provider,
       Map<String, String> properties) {
     return doWithCatalog(
         catalogIdent,
         c ->
             c.doWithPropertiesMeta(
-                p -> {
-                  PropertiesMetadata propertiesMetadata = provider.apply(p);
-                  return properties.entrySet().stream()
-                      .filter(
-                          e ->
-                              propertiesMetadata.isHiddenProperty(e.getKey())
-                                  || 
SecretPropertyUtils.isSecretProperty(e.getKey(), e.getValue()))
-                      .map(Map.Entry::getKey)
-                      .collect(Collectors.toSet());
-                }),
+                p ->
+                    HiddenPropertyMaskUtils.classifyHiddenProperties(
+                        properties, provider.apply(p))),
         IllegalArgumentException.class);
   }

Review Comment:
   Thank for you review. 
   Renamed getHiddenPropertyNames to getMaskAndOmitKeys, and it now returns 
MaskAndOmitKeys (keysToMask / keysToOmit) instead of Map.Entry.



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