This is an automated email from the ASF dual-hosted git repository.

diqiu50 pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/gravitino.git


The following commit(s) were added to refs/heads/main by this push:
     new 306732f1c4 [IMP]:Fixed the Javadoc in dropCatalog in 
DropCatalogStoredProcedure.java (#8401)
306732f1c4 is described below

commit 306732f1c4656005e51f2692fdf8f17aefcfb1dd
Author: Raj Gupta <[email protected]>
AuthorDate: Wed Sep 10 13:00:15 2025 +0530

    [IMP]:Fixed the Javadoc in dropCatalog in DropCatalogStoredProcedure.java 
(#8401)
    
    <!--
    1. Title: [#<issue>] <type>(<scope>): <subject>
       Examples:
         - "[#123] feat(operator): support xxx"
         - "[#233] fix: check null before access result in xxx"
         - "[MINOR] refactor: fix typo in variable name"
         - "[MINOR] docs: fix typo in README"
         - "[#255] test: fix flaky test NameOfTheTest"
       Reference: https://www.conventionalcommits.org/en/v1.0.0/
    2. If the PR is unfinished, please mark this PR as draft.
    -->
    
    ### What changes were proposed in this pull request?
    
    (Please outline the changes and how this PR fixes the issue.)
    
    ### Why are the changes needed?
    
    (Please clarify why the changes are needed. For instance,
      1. If you propose a new API, clarify the use case for a new API.
      2. If you fix a bug, describe the bug.)
    
    Fix: #8388
    
    ### Does this PR introduce _any_ user-facing change?
    
    (Please list the user-facing changes introduced by your change,
    including
      1. Change in user-facing APIs.
      2. Addition or removal of property keys.)
    
    ### How was this patch tested?
    
    (Please test your changes, and provide instructions on how to test it:
    1. If you add a feature or fix a bug, add a test to cover your changes.
    2. If you fix a flaky test, repeat it for many times to prove it works.)
    
    ---------
    
    Co-authored-by: Yuhui <[email protected]>
---
 .../connector/system/storedprocedure/DropCatalogStoredProcedure.java | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git 
a/trino-connector/trino-connector/src/main/java/org/apache/gravitino/trino/connector/system/storedprocedure/DropCatalogStoredProcedure.java
 
b/trino-connector/trino-connector/src/main/java/org/apache/gravitino/trino/connector/system/storedprocedure/DropCatalogStoredProcedure.java
index 19970fd1b4..e57ac6e8fc 100644
--- 
a/trino-connector/trino-connector/src/main/java/org/apache/gravitino/trino/connector/system/storedprocedure/DropCatalogStoredProcedure.java
+++ 
b/trino-connector/trino-connector/src/main/java/org/apache/gravitino/trino/connector/system/storedprocedure/DropCatalogStoredProcedure.java
@@ -80,7 +80,8 @@ public class DropCatalogStoredProcedure extends 
GravitinoStoredProcedure {
    * Drops the specified catalog.
    *
    * @param catalogName the name of the catalog to drop
-   * @param ignoreNotExist whether to ignore if the catalog does not exist
+   * @param ignoreNotExist whether to ignore if the catalog does not exist 
(only checked when the
+   *     catalog cannot be found initially)
    * @throws TrinoException if the catalog does not exist and ignoreNotExist 
is false
    */
   public void dropCatalog(String catalogName, boolean ignoreNotExist) {
@@ -97,6 +98,8 @@ public class DropCatalogStoredProcedure extends 
GravitinoStoredProcedure {
             GravitinoErrorCode.GRAVITINO_CATALOG_NOT_EXISTS,
             "Catalog " + NameIdentifier.of(metalake, catalogName) + " not 
exists.");
       }
+      // Always ignore "ignoreNotExist" inside Metalake.dropCatalog()
+      // because we already handled the null check above.
       catalogConnector.getMetalake().dropCatalog(catalogName, true);
 
       catalogConnectorManager.loadMetalakeSync();

Reply via email to