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

morrysnow pushed a commit to branch branch-2.1
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/branch-2.1 by this push:
     new 8c4f5af7089 [opt](Nereids) auto fallback when insert unsupport catalog 
(#33353) (#35453)
8c4f5af7089 is described below

commit 8c4f5af708947b633b74c4d9dfffcffbc5da23bb
Author: morrySnow <[email protected]>
AuthorDate: Mon May 27 16:58:35 2024 +0800

    [opt](Nereids) auto fallback when insert unsupport catalog (#33353) (#35453)
    
    pick from master #33353
---
 .../doris/nereids/analyzer/UnboundTableSinkCreator.java    | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git 
a/fe/fe-core/src/main/java/org/apache/doris/nereids/analyzer/UnboundTableSinkCreator.java
 
b/fe/fe-core/src/main/java/org/apache/doris/nereids/analyzer/UnboundTableSinkCreator.java
index fd70401f25d..e1c771b6a4c 100644
--- 
a/fe/fe-core/src/main/java/org/apache/doris/nereids/analyzer/UnboundTableSinkCreator.java
+++ 
b/fe/fe-core/src/main/java/org/apache/doris/nereids/analyzer/UnboundTableSinkCreator.java
@@ -111,10 +111,18 @@ public class UnboundTableSinkCreator {
             return new UnboundIcebergTableSink<>(nameParts, colNames, hints, 
partitions,
                 dmlCommandType, Optional.empty(), Optional.empty(), plan);
         }
+        // TODO: we need to support insert into other catalog
+        try {
+            if (ConnectContext.get() != null) {
+                
ConnectContext.get().getSessionVariable().enableFallbackToOriginalPlannerOnce();
+            }
+        } catch (Exception e) {
+            // ignore this.
+        }
         throw new AnalysisException(
-                "Auto overwrite data to " + 
curCatalog.getClass().getSimpleName() + " is not supported."
+                (isOverwrite ? "insert overwrite" : "insert") + " data to " + 
curCatalog.getClass().getSimpleName()
+                        + " is not supported."
                         + (isAutoDetectPartition
-                                ? " PARTITION(*) is only supported in 
overwrite partition for OLAP table"
-                                : ""));
+                        ? " PARTITION(*) is only supported in overwrite 
partition for OLAP table" : ""));
     }
 }


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to