bharos commented on code in PR #9787:
URL: https://github.com/apache/gravitino/pull/9787#discussion_r2719466464


##########
api/src/main/java/org/apache/gravitino/rel/ViewCatalog.java:
##########
@@ -0,0 +1,43 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.gravitino.rel;
+
+import org.apache.gravitino.NameIdentifier;
+import org.apache.gravitino.annotation.Evolving;
+import org.apache.gravitino.exceptions.NoSuchViewException;
+
+/**
+ * The ViewCatalog interface defines the public API for managing views in a 
schema. If the catalog
+ * implementation supports views, it must implement this interface.
+ *
+ * <p>Note: This is a minimal interface. Full operations (create, list, alter, 
drop) will be added
+ * when Gravitino APIs support views.
+ */
+@Evolving

Review Comment:
   done



##########
api/src/main/java/org/apache/gravitino/Catalog.java:
##########
@@ -246,6 +246,16 @@ default FunctionCatalog asFunctionCatalog() throws 
UnsupportedOperationException
     throw new UnsupportedOperationException("Catalog does not support function 
operations");
   }
 
+  /**
+   * @return the {@link org.apache.gravitino.rel.ViewCatalog} if the catalog 
supports view
+   *     operations.
+   * @throws UnsupportedOperationException if the catalog does not support 
view operations.
+   */
+  default org.apache.gravitino.rel.ViewCatalog asViewCatalog()

Review Comment:
   done



##########
catalogs/catalog-lakehouse-iceberg/src/main/java/org/apache/gravitino/catalog/lakehouse/iceberg/IcebergCatalogOperations.java:
##########
@@ -620,6 +623,30 @@ public void testConnection(
     }
   }
 
+  /**
+   * Load view metadata from the Iceberg catalog.
+   *
+   * <p>Delegates to the underlying Iceberg REST catalog to load view metadata.
+   *
+   * @param ident The identifier of the view to load.
+   * @return The loaded view metadata.
+   * @throws org.apache.gravitino.exceptions.NoSuchViewException If the view 
does not exist.
+   */
+  @Override
+  public View loadView(org.apache.gravitino.NameIdentifier ident)
+      throws org.apache.gravitino.exceptions.NoSuchViewException {
+    try {
+      org.apache.iceberg.rest.responses.LoadViewResponse response =

Review Comment:
   done



-- 
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]

Reply via email to