wsjz commented on code in PR #31765:
URL: https://github.com/apache/doris/pull/31765#discussion_r1526440630


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/insert/InsertUtils.java:
##########
@@ -345,13 +347,17 @@ private static Expression castValue(Expression value, 
DataType targetType) {
      * get target table from names.
      */
     public static TableIf getTargetTable(Plan plan, ConnectContext ctx) {
-        if (!(plan instanceof UnboundTableSink)) {
-            throw new AnalysisException("the root of plan should be 
UnboundTableSink"
-                    + " but it is " + plan.getType());
+        if (plan instanceof UnboundTableSink) {

Review Comment:
   UnboundTableSink is too complex, so we should refactor to UnboundTableSink 
first. 
   Before the refactor, to simplify the problem,we should use 'if-else' to 
distinguish olap and hive for the moment.
   。



-- 
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-unsubscr...@doris.apache.org

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


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

Reply via email to