You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by "morningman (via GitHub)" <gi...@apache.org> on 2023/01/31 03:29:51 UTC

[GitHub] [doris] morningman commented on a diff in pull request #16271: [feature](JdbcExternalCatalog) support insert data in JdbcExternalCatalog

morningman commented on code in PR #16271:
URL: https://github.com/apache/doris/pull/16271#discussion_r1091406966


##########
fe/fe-core/src/main/java/org/apache/doris/analysis/InsertStmt.java:
##########
@@ -322,8 +331,15 @@ public void analyze(Analyzer analyzer) throws UserException {
     private void analyzeTargetTable(Analyzer analyzer) throws AnalysisException {
         // Get table
         if (targetTable == null) {
-            DatabaseIf db = Env.getCurrentInternalCatalog().getDbOrAnalysisException(tblName.getDb());
-            targetTable = (Table) db.getTableOrAnalysisException(tblName.getTbl());
+            DatabaseIf db = analyzer.getEnv().getCurrentCatalog().getDbOrAnalysisException(tblName.getDb());

Review Comment:
   `getCurrentInternalCatalog` only return `InternalCatalog`, no matter what is your current catalog is. But `getCurrentCatalog` will return the real current catalog(set by `switch` cmd)



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