jerryshao commented on code in PR #9502:
URL: https://github.com/apache/gravitino/pull/9502#discussion_r2650930845


##########
core/src/main/java/org/apache/gravitino/catalog/CatalogManager.java:
##########
@@ -805,28 +803,33 @@ && containsUserCreatedSchemas(schemaEntities, 
catalogEntity, catalogWrapper)) {
    * </ul>
    *
    * @param schemaEntities The list of schema entities to check.
-   * @param catalogEntity The catalog entity to which the schemas belong.
    * @param catalogWrapper The catalog wrapper for the catalog.
    * @return True if the list of schema entities contains any valid 
user-created schemas, false
    *     otherwise.
    * @throws Exception If an error occurs while checking the schemas.
    */
   private boolean containsUserCreatedSchemas(
-      List<SchemaEntity> schemaEntities, CatalogEntity catalogEntity, 
CatalogWrapper catalogWrapper)
-      throws Exception {
+      List<SchemaEntity> schemaEntities, CatalogWrapper catalogWrapper) throws 
Exception {
     if (schemaEntities.isEmpty()) {
       return false;
     }
 
+    if (isManagedStorageCatalog(catalogWrapper)) {
+      // For managed storage catalog, any existing schema entities are 
considered user-created. At
+      // this point we already know schemaEntities is not empty, so we can 
return true directly
+      // without further checks.
+      return true;
+    }

Review Comment:
   Please check how I implement the `managedStorageCatalog`.



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