Skip to content

Commit a667087

Browse files
committed
review: rename to PURGE_VIEW_METADATA_ON_DROP
1 parent 7348640 commit a667087

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
@@ -50,7 +50,7 @@ at locations that better optimize for object storage.
5050
- The Helm chart now supports Pod Disruption Budgets (PDBs) for Polaris components. This allows users to define
5151
the minimum number of pods that must be available during voluntary disruptions, such as node maintenance.
5252

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

5555
### Changes
5656

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)