You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2022/07/01 08:27:43 UTC

[GitHub] [doris] AshinGau commented on a diff in pull request #10521: [feature-wip](multi-catalog) end to end to support multi-catalog

AshinGau commented on code in PR #10521:
URL: https://github.com/apache/doris/pull/10521#discussion_r911739124


##########
fe/fe-core/src/main/java/org/apache/doris/qe/ShowExecutor.java:
##########
@@ -1005,8 +1013,9 @@ private void handleHelp() {
     private void handleShowLoad() throws AnalysisException {
         ShowLoadStmt showStmt = (ShowLoadStmt) stmt;
 
-        Catalog catalog = Catalog.getCurrentCatalog();
-        DatabaseIf db = catalog.getCurrentDataSource().getDbOrAnalysisException(showStmt.getDbName());
+        Util.prohibitExternalCatalog(ctx.getDefaultCatalog(), stmt.getClass().getSimpleName());
+        Catalog catalog = ctx.getCatalog();

Review Comment:
   `Catalog.getCurrentCatalog()` gets `Catalog` from thread local, and `ctx.getCatalog()` gets `Catalog` from its own. Using the self bound variable can check whether the`ConnectContext` is initialized correctly.



-- 
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: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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