[fix](iceberg) Allow disabling REST catalog view operations#62986
[fix](iceberg) Allow disabling REST catalog view operations#62986xylaaaaa wants to merge 1 commit intoapache:masterfrom
Conversation
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
There was a problem hiding this comment.
Pull request overview
Adds a REST-catalog-specific switch to skip Iceberg view operations so Doris can still list/load tables against REST catalog implementations that don’t support (or reject) view APIs.
Changes:
- Introduces
iceberg.rest.view-enabled(defaulttrue) inIcebergRestProperties. - Gates view-related calls in
IcebergMetadataOpsbehind the new property for REST catalogs. - Adds unit tests covering the property behavior and verifying
listViews()is skipped when disabled.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| fe/fe-core/src/main/java/org/apache/doris/datasource/property/metastore/IcebergRestProperties.java | Adds the new REST property and accessor (isIcebergRestViewEnabled()). |
| fe/fe-core/src/main/java/org/apache/doris/datasource/iceberg/IcebergMetadataOps.java | Centralizes view capability logic via isViewCatalogEnabled() and uses it to guard view operations. |
| fe/fe-core/src/test/java/org/apache/doris/datasource/property/metastore/IcebergRestPropertiesTest.java | Tests default enabled behavior and the false override. |
| fe/fe-core/src/test/java/org/apache/doris/datasource/iceberg/IcebergMetadataOpTest.java | Verifies listTableNames() skips listViews() when view ops are disabled for REST. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| if (!isViewCatalogEnabled()) { | ||
| throw new DdlException("Drop Iceberg view is not supported with not view catalog."); | ||
| } |
There was a problem hiding this comment.
The DdlException message here becomes misleading when view ops are disabled via iceberg.rest.view-enabled=false: isViewCatalogEnabled() can return false even though catalog is a ViewCatalog. Consider updating the message (or branching) to indicate that view operations are disabled by configuration, not that the catalog lacks ViewCatalog support.
|
run buildall |
What problem does this PR solve?
Some Iceberg REST catalog implementations expose table APIs but fail or reject view APIs. Doris currently calls
ViewCatalog.listViews()while listing tables when the underlying Iceberg catalog implementsViewCatalog, soSHOW TABLESand table metadata loading can fail even when table listing/loading works.This PR adds a REST catalog property to disable view operations when needed, while keeping the existing default behavior enabled.
Changes
iceberg.rest.view-enabledtoIcebergRestProperties, defaulting totrue.IcebergMetadataOpsfor REST catalogs when the property is set tofalse.listViews()in table listing.Check List
mvn -pl fe-core -am -Dtest=IcebergRestPropertiesTest,IcebergMetadataOpTest -Dcheckstyle.skip=true -DfailIfNoTests=false -Dmaven.build.cache.enabled=false test