mymeiyi commented on code in PR #31666:
URL: https://github.com/apache/doris/pull/31666#discussion_r1512050780


##########
fe/fe-core/src/main/java/org/apache/doris/qe/StmtExecutor.java:
##########
@@ -507,10 +505,12 @@ public void execute(TUniqueId queryId) throws Exception {
                         LOG.warn("Analyze failed. {}", 
context.getQueryIdentifier(), e);
                         throw ((NereidsException) e).getException();
                     }
-                    boolean isInsertIntoCommand = parsedStmt != null && 
parsedStmt instanceof LogicalPlanAdapter
-                            && ((LogicalPlanAdapter) 
parsedStmt).getLogicalPlan() instanceof InsertIntoTableCommand;
-                    if (e instanceof NereidsException
-                            && 
!context.getSessionVariable().enableFallbackToOriginalPlanner && 
!isInsertIntoCommand) {
+                    boolean isGroupCommit = (parsedStmt != null
+                            && parsedStmt instanceof LogicalPlanAdapter
+                            && ((LogicalPlanAdapter) 
parsedStmt).getLogicalPlan() instanceof InsertIntoTableCommand)
+                            && !context.isTxnModel();

Review Comment:
   The logic should be
   ```
   boolean isGroupCommit = (Config.wait_internal_group_commit_finish
                               || 
context.sessionVariable.isEnableInsertGroupCommit()) && parsedStmt != null
                               && parsedStmt instanceof LogicalPlanAdapter
                               && ((LogicalPlanAdapter) 
parsedStmt).getLogicalPlan() instanceof InsertIntoTableCommand;
   ```
   
   but some nereids case can not pass.
   I add `!context.isTxnModel()`  here becase the regression cases expect txn 
insert does not force fallkack



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to