This is an automated email from the ASF dual-hosted git repository.

dimas pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/polaris.git


The following commit(s) were added to refs/heads/main by this push:
     new bf25373d0 Use typed config for `ALLOW_WILDCARD_LOCATION` (#3479)
bf25373d0 is described below

commit bf25373d025f917973778610c7b9bd01cdecc680
Author: Dmitri Bourlatchkov <[email protected]>
AuthorDate: Fri Jan 23 10:13:58 2026 -0500

    Use typed config for `ALLOW_WILDCARD_LOCATION` (#3479)
    
    Add a typed `FeatureConfiguration` with the same config name and default 
value.
---
 .../org/apache/polaris/core/config/FeatureConfiguration.java     | 9 +++++++++
 .../apache/polaris/core/storage/InMemoryStorageIntegration.java  | 4 +++-
 2 files changed, 12 insertions(+), 1 deletion(-)

diff --git 
a/polaris-core/src/main/java/org/apache/polaris/core/config/FeatureConfiguration.java
 
b/polaris-core/src/main/java/org/apache/polaris/core/config/FeatureConfiguration.java
index bfcad26e8..d9fe3d564 100644
--- 
a/polaris-core/src/main/java/org/apache/polaris/core/config/FeatureConfiguration.java
+++ 
b/polaris-core/src/main/java/org/apache/polaris/core/config/FeatureConfiguration.java
@@ -195,6 +195,15 @@ public class FeatureConfiguration<T> extends 
PolarisConfiguration<T> {
           .defaultValue(true)
           .buildFeatureConfiguration();
 
+  public static final FeatureConfiguration<Boolean> ALLOW_WILDCARD_LOCATION =
+      PolarisConfiguration.<Boolean>builder()
+          .key("ALLOW_WILDCARD_LOCATION")
+          .description(
+              "Indicates whether asterisks ('*') in configuration values 
defining allowed"
+                  + " storage locations are processed as meaning 'any 
location'.")
+          .defaultValue(false)
+          .buildFeatureConfiguration();
+
   @SuppressWarnings("deprecation")
   public static final FeatureConfiguration<List<String>> 
SUPPORTED_CATALOG_STORAGE_TYPES =
       PolarisConfiguration.<List<String>>builder()
diff --git 
a/polaris-core/src/main/java/org/apache/polaris/core/storage/InMemoryStorageIntegration.java
 
b/polaris-core/src/main/java/org/apache/polaris/core/storage/InMemoryStorageIntegration.java
index ea4ca1c59..25e301208 100644
--- 
a/polaris-core/src/main/java/org/apache/polaris/core/storage/InMemoryStorageIntegration.java
+++ 
b/polaris-core/src/main/java/org/apache/polaris/core/storage/InMemoryStorageIntegration.java
@@ -18,6 +18,8 @@
  */
 package org.apache.polaris.core.storage;
 
+import static 
org.apache.polaris.core.config.FeatureConfiguration.ALLOW_WILDCARD_LOCATION;
+
 import jakarta.annotation.Nonnull;
 import java.util.HashMap;
 import java.util.List;
@@ -75,7 +77,7 @@ public abstract class InMemoryStorageIntegration<T extends 
PolarisStorageConfigu
     List<StorageLocation> allowedLocations =
         
allowedLocationStrings.stream().map(StorageLocation::of).collect(Collectors.toList());
 
-    boolean allowWildcardLocation = 
realmConfig.getConfig("ALLOW_WILDCARD_LOCATION", false);
+    boolean allowWildcardLocation = 
realmConfig.getConfig(ALLOW_WILDCARD_LOCATION);
 
     if (allowWildcardLocation && allowedLocationStrings.contains("*")) {
       return locations.stream()

Reply via email to