zhannngchen commented on code in PR #31666:
URL: https://github.com/apache/doris/pull/31666#discussion_r1512084873
##########
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:
so the variable name now should not be `isGroupCommit`? please use a better
variable name, and add comments to explain it here
##########
fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/insert/InsertUtils.java:
##########
@@ -162,6 +162,10 @@ private static InternalService.PDataRow
getRowStringValue(List<NamedExpression>
private static void beginBatchInsertTransaction(ConnectContext ctx,
String dbName, String tblName, List<Column> columns) {
TransactionEntry txnEntry = ctx.getTxnEntry();
+ if (txnEntry.isTransactionBegan()) {
+ throw new AnalysisException(
+ "Transaction insert can not insert into values and insert
into select at the same time");
Review Comment:
add a TODO coment here, we'll support mix usage of insert into values and
insert into select in future.
--
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]