Gabriel39 commented on code in PR #34564:
URL: https://github.com/apache/doris/pull/34564#discussion_r1630573660


##########
fe/fe-core/src/main/java/org/apache/doris/qe/ResultReceiver.java:
##########
@@ -84,7 +84,7 @@ public RowBatch getNext(Status status) throws TException {
         try {
             while (!isDone && !isCancel()) {
                 InternalService.PFetchDataRequest request = 
InternalService.PFetchDataRequest.newBuilder()
-                        .setFinstId(finstId)

Review Comment:
   Keep compatibility



##########
fe/fe-core/src/main/java/org/apache/doris/qe/Coordinator.java:
##########
@@ -1325,13 +1333,13 @@ private void updateStatus(Status status) {
 
     @Override
     public RowBatch getNext() throws Exception {
-        if (receiver == null) {
+        if (receivers.isEmpty()) {
             throw new UserException("There is no receiver.");
         }
 
         RowBatch resultBatch;
         Status status = new Status();
-        resultBatch = receiver.getNext(status);
+        resultBatch = receivers.get(receivers.size() - 1).getNext(status);

Review Comment:
   Maybe round-robin ?



##########
fe/fe-core/src/main/java/org/apache/doris/nereids/properties/RequestPropertyDeriver.java:
##########
@@ -142,7 +142,7 @@ public Void 
visitPhysicalHiveTableSink(PhysicalHiveTableSink<? extends Plan> hiv
 
     @Override
     public Void visitPhysicalResultSink(PhysicalResultSink<? extends Plan> 
physicalResultSink, PlanContext context) {
-        addRequestPropertyToChildren(PhysicalProperties.GATHER);
+        addRequestPropertyToChildren(PhysicalProperties.ANY);

Review Comment:
   If `order by` exists in this query ,we need a `GATHER` exchange opeartor to 
do global merge sort here.



##########
fe/fe-core/src/main/java/org/apache/doris/qe/Coordinator.java:
##########
@@ -1505,8 +1520,10 @@ private void cancelLatch() {
     }
 
     private void cancelInternal(Types.PPlanFragmentCancelReason cancelReason) {
-        if (null != receiver) {
-            receiver.cancel(cancelReason);
+        if (receivers.isEmpty()) {

Review Comment:
   ```suggestion
           if (!receivers.isEmpty()) {
   ```



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