dataroaring commented on code in PR #48621:
URL: https://github.com/apache/doris/pull/48621#discussion_r1979231033


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/insert/OlapGroupCommitInsertExecutor.java:
##########
@@ -133,12 +134,14 @@ protected static void analyzeGroupCommit(ConnectContext 
ctx, TableIf table, Logi
                     () -> "not allowModifyMTMVData"));
             conditions.add(Pair.of(() -> !(insertCtx.isPresent() && 
insertCtx.get() instanceof OlapInsertCommandContext
                     && ((OlapInsertCommandContext) 
insertCtx.get()).isOverwrite()), () -> "is overwrite command"));
-            conditions.add(Pair.of(
-                    () -> tableSink.child() instanceof OneRowRelation
-                            || tableSink.child() instanceof LogicalUnion
-                            || tableSink.child() instanceof InlineTable,
-                    () -> "not one row relation or union or inline table, 
class: "
-                            + tableSink.child().getClass().getName()));
+            Plan tableSinkChild = tableSink.child();
+            conditions.add(Pair.of(() -> tableSinkChild instanceof 
OneRowRelation
+                            || (tableSinkChild instanceof LogicalUnion
+                            && tableSinkChild.getExpressions().size() > 0)
+                            || tableSinkChild instanceof InlineTable,
+                    () -> "should be one row relation or union or inline 
table, class: "
+                            + tableSinkChild.getClass().getName() + 
(tableSinkChild instanceof LogicalUnion
+                            ? ", expression size is 0" : "")));

Review Comment:
   Are there some cases for conditions above?



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