Describe the bug
Dropping a view on a catalog with no purge-related configuration set fails with a 403:
ForbiddenException: Unable to purge entity: view1. To enable this feature, set the Polaris
configuration DROP_WITH_PURGE_ENABLED or the catalog configuration
polaris.config.drop-with-purge.enabled
The cause is the interaction of two defaults:
LocalIcebergCatalog.dropView derives purge from the first and passes it to dropTableLike, whose guard rejects purge=true unless the second is enabled. So the shipped defaults are exactly the combination that fails.
PolarisRestCatalogIntegrationBase.testDropViewWithPurge explicitly pins the behaviour when both properties are set (DROP_WITH_PURGE_ENABLED=false + PURGE_VIEW_METADATA_ON_DROP=true → ForbiddenException)
|
catalogProps.put(FeatureConfiguration.DROP_WITH_PURGE_ENABLED.catalogConfig(), "false"); |
|
catalogProps.put(FeatureConfiguration.PURGE_VIEW_METADATA_ON_DROP.catalogConfig(), "true"); |
|
managementApi.updateCatalog(catalog, catalogProps); |
|
|
|
assertThatThrownBy(() -> restCatalog.dropView(id)).isInstanceOf(ForbiddenException.class); |
|
|
If we want to make it work under default conditions. I see two options here: Change the default value of PURGE_VIEW_METADATA_ON_DROP or make it independent of DROP_WITH_PURGE_ENABLED and let the later gaurd only tables not Views
To Reproduce
No response
Actual Behavior
No response
Expected Behavior
No response
Additional context
No response
System information
No response
Describe the bug
Dropping a view on a catalog with no purge-related configuration set fails with a 403:
The cause is the interaction of two defaults:
DROP_WITH_PURGE_ENABLEDdefaults tofalsepolaris/polaris-core/src/main/java/org/apache/polaris/core/config/FeatureConfiguration.java
Lines 424 to 432 in ffa6977
PURGE_VIEW_METADATA_ON_DROPdefaults totruepolaris/polaris-core/src/main/java/org/apache/polaris/core/config/FeatureConfiguration.java
Lines 434 to 441 in ffa6977
LocalIcebergCatalog.dropViewderives purge from the first and passes it todropTableLike, whose guard rejects purge=true unless the second is enabled. So the shipped defaults are exactly the combination that fails.PolarisRestCatalogIntegrationBase.testDropViewWithPurgeexplicitly pins the behaviour when both properties are set (DROP_WITH_PURGE_ENABLED=false+PURGE_VIEW_METADATA_ON_DROP=true→ForbiddenException)polaris/integration-tests/src/main/java/org/apache/polaris/service/it/test/PolarisRestCatalogIntegrationBase.java
Lines 1902 to 1907 in ffa6977
If we want to make it work under default conditions. I see two options here: Change the default value of
PURGE_VIEW_METADATA_ON_DROPor make it independent ofDROP_WITH_PURGE_ENABLEDand let the later gaurd only tables not ViewsTo Reproduce
No response
Actual Behavior
No response
Expected Behavior
No response
Additional context
No response
System information
No response