gh-yzou commented on code in PR #1286:
URL: https://github.com/apache/polaris/pull/1286#discussion_r2021934224


##########
polaris-core/src/main/java/org/apache/polaris/core/config/PolarisConfiguration.java:
##########
@@ -135,6 +135,24 @@ public static <T> T loadConfig(PolarisConfiguration<T> 
configuration) {
         .getConfiguration(callContext.getPolarisCallContext(), configuration);
   }
 
+  /**
+   * Returns the value of a `PolarisConfiguration` within the given 
callContext, or the default if
+   * no callContext is provided.
+   */
+  public static <T> T loadConfig(PolarisConfiguration<T> configuration, 
CallContext callContext) {

Review Comment:
   I was mainly trying to add a shorthand function that doesn't really look 
into the CurrentContext, but with a given context. I reverted this function for 
now, and we can do this in a separate PR if needed.



##########
service/common/src/main/java/org/apache/polaris/service/catalog/iceberg/IcebergCatalogAdapter.java:
##########
@@ -652,6 +663,13 @@ public Response getConfig(
         
PolarisEntity.of(resolvedReferenceCatalog.getEntity()).getPropertiesAsMap();
 
     String prefix = prefixParser.catalogNameToPrefix(realmContext, warehouse);
+
+    // add the generic table endpoints as supported endpoints if generic table 
feature is enabled.
+    Set<Endpoint> supportedGenericTableEndpoints =
+        
PolarisConfiguration.loadConfig(FeatureConfiguration.ENABLE_GENERIC_TABLES, 
callContext)
+            ? GENERIC_TABLE_ENDPOINTS
+            : ImmutableSet.of();
+
     return Response.ok(

Review Comment:
   The change is guarded by the feature flag, when the flag is false, none of 
the endpoints will be added. I assume once all server side work is done, you 
will have one PR to flip the flag to true, and those endpoint will then be 
added as supported.  If user turns this flag on before it is ready, i don't 
think we provide any guarantee for them when they call the endpoints. 



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