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


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/insert/GroupCommitInsertExecutor.java:
##########
@@ -141,4 +160,43 @@ private void handleGroupCommit(ConnectContext ctx, 
DataSink sink,
         // update it, so that user can get loaded rows in fe.audit.log
         ctx.updateReturnRows((int) response.getLoadedRows());
     }
+
+    @Override
+    public void beginTransaction() {
+
+    }
+
+    @Override
+    protected void finalizeSink(PlanFragment fragment, DataSink sink, 
PhysicalSink physicalSink) {
+
+    }
+
+    @Override
+    protected void beforeExec() {
+
+    }
+
+    @Override
+    protected void onComplete() throws UserException {
+        Optional<PhysicalOlapTableSink<?>> plan = (planner.getPhysicalPlan()
+                
.<Set<PhysicalOlapTableSink<?>>>collect(PhysicalSink.class::isInstance)).stream()
+                .findAny();
+        PhysicalOlapTableSink<?> olapSink = plan.get();
+        DataSink sink = planner.getFragments().get(0).getSink();
+        try {
+            handleGroupCommit(ctx, sink, olapSink, planner);
+        } catch (TException | RpcException | ExecutionException | 
InterruptedException e) {
+            LOG.warn("errors when group commit insert. {}", e);

Review Comment:
   does client receive error when handle failed?



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