yuqi1129 commented on code in PR #13896:
URL: https://github.com/apache/gravitino/pull/13896#discussion_r4294191683
##########
iceberg/iceberg-common/src/main/java/org/apache/gravitino/iceberg/common/ops/IcebergCatalogWrapper.java:
##########
@@ -360,8 +365,28 @@ public LoadViewResponse updateView(TableIdentifier
viewIdentifier, UpdateTableRe
return CatalogHandlers.updateView(getViewCatalog(), viewIdentifier,
request);
}
+ /**
+ * Loads a view response from one metadata snapshot.
+ *
+ * @param viewIdentifier the view to load
+ * @return the view metadata and its location
+ * @throws NoSuchViewException if the view does not exist or disappears
during loading
+ */
public LoadViewResponse loadView(TableIdentifier viewIdentifier) {
- return CatalogHandlers.loadView(getViewCatalog(), viewIdentifier);
+ View view = getViewCatalog().loadView(viewIdentifier);
+ Preconditions.checkState(
+ view instanceof BaseView, "Cannot wrap catalog that does not produce
BaseView");
+ ViewMetadata metadata = ((BaseView) view).operations().current();
Review Comment:
No, I checked it, and the table works well.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]