Uh oh!
There was an error while loading. Please reload this page.
[fix](iceberg) Allow disabling REST catalog view operations - #63319
Conversation
(cherry picked from commit 1ba3699)
hello-stephen
commented
May 17, 2026
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds a new Iceberg REST property to toggle view support and updates Iceberg metadata operations to honor it (primarily to avoid calling view APIs when disabled).
Changes:
- Introduces
iceberg.rest.view-enabled(defaulttrue) inIcebergRestProperties. - Gates view-related metadata operations (
listViews,viewExists,loadView, etc.) behind a newisViewCatalogEnabled()check. - Adds unit tests for the new property and for
listTableNamesbehavior with views enabled/disabled.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| fe/fe-core/src/main/java/org/apache/doris/datasource/property/metastore/IcebergRestProperties.java | Adds the iceberg.rest.view-enabled connector property and accessor. |
| fe/fe-core/src/main/java/org/apache/doris/datasource/iceberg/IcebergMetadataOps.java | Uses the new toggle to conditionally enable/disable view operations in metadata flows. |
| fe/fe-core/src/test/java/org/apache/doris/datasource/property/metastore/IcebergRestPropertiesTest.java | Adds a test validating the new REST view-enabled behavior/default. |
| fe/fe-core/src/test/java/org/apache/doris/datasource/iceberg/IcebergMetadataOpTest.java | Adds tests to ensure listTableNames avoids listViews when view support is disabled. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| private void performDropView(String remoteDbName, String remoteViewName) throws DdlException { | ||
| if (!(catalog instanceof ViewCatalog)) { | ||
| if (!isViewCatalogEnabled()) { | ||
| throw new DdlException("Drop Iceberg view is not supported with not view catalog."); |
| // IcebergMetadataOps handles listTableNames and listViewNames separately. | ||
| // listTableNames should only focus on the table type, | ||
| // but in reality, Iceberg's return includes views. Therefore, we added a filter to exclude views. | ||
| if (catalog instanceof ViewCatalog) { | ||
| if (isViewCatalogEnabled()) { | ||
| views = ((ViewCatalog) catalog).listViews(getNamespace(dbName)) | ||
| .stream().map(TableIdentifier::name).collect(Collectors.toList()); | ||
| } else { |
| private boolean isViewCatalogEnabled() { | ||
| if (!(catalog instanceof ViewCatalog)) { | ||
| return false; | ||
| } | ||
| if (dorisCatalog instanceof IcebergRestExternalCatalog) { | ||
| MetastoreProperties metaProps = dorisCatalog.getCatalogProperty().getMetastoreProperties(); | ||
| if (metaProps instanceof IcebergRestProperties) { | ||
| return ((IcebergRestProperties) metaProps).isIcebergRestViewEnabled(); | ||
| } | ||
| } | ||
| return true; |
| if (!isViewCatalogEnabled()) { | ||
| return false; | ||
| } |
xylaaaaa
commented
May 17, 2026
run buildall |
hello-stephen
commented
May 17, 2026
FE UT Coverage ReportIncrement line coverage |
Uh oh!
There was an error while loading. Please reload this page.
What problem does this PR solve?
Issue Number: None
Related PR: #62986
Problem Summary: Backport #62986 to branch-4.0. This allows Iceberg REST catalog users to disable view operations with
iceberg.rest.view-enabled=falsewhen the REST catalog does not support view endpoints. The default remains enabled.Release note
Add
iceberg.rest.view-enabledfor Iceberg REST catalog. It defaults to true and can be set to false to skip view operations.Check List (For Author)
Test
Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)
Test
MAVEN_OPTS='-Xmx4g -XX:MaxMetaspaceSize=1g' FE_UT_PARALLEL=1 ./run-fe-ut.sh --run org.apache.doris.datasource.iceberg.IcebergMetadataOpTest,org.apache.doris.datasource.property.metastore.IcebergRestPropertiesTest