Skip to content

Commit ccd5214

Browse files
committed
review: rename to PURGE_VIEW_METADATA_ON_DROP
1 parent f51e0b5 commit ccd5214

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ the authentication parameters are picked from the environment or configuration f
4747
- The `DEFAULT_LOCATION_OBJECT_STORAGE_PREFIX_ENABLED` feature was added to support placing tables
4848
at locations that better optimize for object storage.
4949

50-
- Feature configuration `PURGE_VIEWS_ON_DROP` was added to allow dropping views without purging their metadata files.
50+
- Feature configuration `PURGE_VIEW_METADATA_ON_DROP` was added to allow dropping views without purging their metadata files.
5151

5252
### Changes
5353

integration-tests/src/main/java/org/apache/polaris/service/it/test/PolarisRestCatalogIntegrationBase.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1213,13 +1213,13 @@ public void testDropViewWithPurge() {
12131213
Catalog catalog = managementApi.getCatalog(currentCatalogName);
12141214
Map<String, String> catalogProps = new HashMap<>(catalog.getProperties().toMap());
12151215
catalogProps.put(FeatureConfiguration.DROP_WITH_PURGE_ENABLED.catalogConfig(), "false");
1216-
catalogProps.put(FeatureConfiguration.PURGE_VIEWS_ON_DROP.catalogConfig(), "true");
1216+
catalogProps.put(FeatureConfiguration.PURGE_VIEW_METADATA_ON_DROP.catalogConfig(), "true");
12171217
managementApi.updateCatalog(catalog, catalogProps);
12181218

12191219
assertThatThrownBy(() -> restCatalog.dropView(id)).isInstanceOf(ForbiddenException.class);
12201220

12211221
catalog = managementApi.getCatalog(currentCatalogName);
1222-
catalogProps.put(FeatureConfiguration.PURGE_VIEWS_ON_DROP.catalogConfig(), "false");
1222+
catalogProps.put(FeatureConfiguration.PURGE_VIEW_METADATA_ON_DROP.catalogConfig(), "false");
12231223
managementApi.updateCatalog(catalog, catalogProps);
12241224

12251225
assertThatCode(() -> restCatalog.dropView(id)).doesNotThrowAnyException();

polaris-core/src/main/java/org/apache/polaris/core/config/FeatureConfiguration.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -191,10 +191,10 @@ public static void enforceFeatureEnabledOrThrow(
191191
.defaultValue(false)
192192
.buildFeatureConfiguration();
193193

194-
public static final FeatureConfiguration<Boolean> PURGE_VIEWS_ON_DROP =
194+
public static final FeatureConfiguration<Boolean> PURGE_VIEW_METADATA_ON_DROP =
195195
PolarisConfiguration.<Boolean>builder()
196-
.key("PURGE_VIEWS_ON_DROP")
197-
.catalogConfig("polaris.config.purge-views-on-drop")
196+
.key("PURGE_VIEW_METADATA_ON_DROP")
197+
.catalogConfig("polaris.config.purge-view-metadata-on-drop")
198198
.description(
199199
"Indicates whether Polaris should purge view metadata files when a view is dropped.")
200200
.defaultValue(true)

runtime/service/src/main/java/org/apache/polaris/service/catalog/iceberg/IcebergCatalog.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -804,7 +804,7 @@ public boolean dropView(TableIdentifier identifier) {
804804
boolean purge =
805805
callContext
806806
.getRealmConfig()
807-
.getConfig(FeatureConfiguration.PURGE_VIEWS_ON_DROP, catalogEntity);
807+
.getConfig(FeatureConfiguration.PURGE_VIEW_METADATA_ON_DROP, catalogEntity);
808808

809809
return dropTableLike(PolarisEntitySubType.ICEBERG_VIEW, identifier, Map.of(), purge)
810810
.isSuccess();

0 commit comments

Comments
 (0)