RussellSpitzer commented on code in PR #433:
URL: https://github.com/apache/polaris/pull/433#discussion_r2093660555


##########
service/common/src/main/java/org/apache/polaris/service/catalog/iceberg/IcebergCatalog.java:
##########
@@ -881,11 +859,57 @@ public Map<String, String> getCredentialConfig(
         getCredentialVendor(),
         callContext.getPolarisCallContext().getConfigurationStore(),
         tableIdentifier,
-        getLocationsAllowedToBeAccessed(tableMetadata),
+        locationsAllowedToBeAccessed,
         storageActions,
         storageInfo.get());
   }
 
+  public MetadataJson loadTableMetadataJson(TableIdentifier identifier) {
+    return loadTableMetadataJson(identifier, SNAPSHOTS_ALL);
+  }
+
+  boolean shouldFilterSnapshots(String snapshots) {
+    if (snapshots == null || snapshots.equalsIgnoreCase(SNAPSHOTS_ALL)) {
+      return false;
+    }
+    return callContext
+        .getPolarisCallContext()
+        .getConfigurationStore()
+        .getConfiguration(
+            callContext.getPolarisCallContext(), 
FeatureConfiguration.ALWAYS_FILTER_SNAPSHOTS);
+  }
+
+  public MetadataJson loadTableMetadataJson(TableIdentifier identifier, String 
snapshots) {
+    int maxMetadataCacheBytes =
+        callContext
+            .getPolarisCallContext()
+            .getConfigurationStore()
+            .getConfiguration(
+                callContext.getPolarisCallContext(), 
FeatureConfiguration.METADATA_CACHE_MAX_BYTES);
+    Supplier<TableMetadata> fallback =

Review Comment:
   I have no problem with the functional interface, I was just wondering if it 
should be a single arg function rather than a no-arg supplier. If we have a one 
arg function we can avoid some garbage generation here by having to make so 
many different suppliers. We would still support a "no-arg" supplier because it 
could just ignore the arg passed through.



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