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

morningman pushed a commit to branch branch-1.2-lts
in repository https://gitbox.apache.org/repos/asf/doris.git

commit 7af4519b24ff9619fc6b6fd876e89ab23e705e34
Author: xueweizhang <zxw520bl...@163.com>
AuthorDate: Thu Dec 22 09:43:15 2022 +0800

    [fix](multi-catalog) fix show data on external catalog (#15227)
    
    if switch external catalog, and use a database that has same name with one 
database of internal catalog,
    query 'show data', will get data info from internal catalog.
---
 fe/fe-core/src/main/java/org/apache/doris/analysis/ShowDataStmt.java | 2 ++
 1 file changed, 2 insertions(+)

diff --git 
a/fe/fe-core/src/main/java/org/apache/doris/analysis/ShowDataStmt.java 
b/fe/fe-core/src/main/java/org/apache/doris/analysis/ShowDataStmt.java
index 3f061d9df1..ce19a53135 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/analysis/ShowDataStmt.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/analysis/ShowDataStmt.java
@@ -99,6 +99,8 @@ public class ShowDataStmt extends ShowStmt {
             // disallow external catalog
             Util.prohibitExternalCatalog(tableName.getCtl(), 
this.getClass().getSimpleName());
             dbName = tableName.getDb();
+        } else {
+            Util.prohibitExternalCatalog(analyzer.getDefaultCatalog(), 
this.getClass().getSimpleName());
         }
 
         Database db = 
Env.getCurrentInternalCatalog().getDbOrAnalysisException(dbName);


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to