github-actions[bot] commented on code in PR #34541:
URL: https://github.com/apache/doris/pull/34541#discussion_r1598160183


##########
be/src/vec/runtime/vdata_stream_recvr.cpp:
##########
@@ -429,10 +433,24 @@ Status VDataStreamRecvr::add_block(const PBlock& pblock, 
int sender_id, int be_n
     return _sender_queues[use_sender_id]->add_block(pblock, be_number, 
packet_seq, done);
 }
 
-void VDataStreamRecvr::add_block(Block* block, int sender_id, bool use_move) {
+bool VDataStreamRecvr::add_block(Block* block, int sender_id, bool use_move) {
     _mem_tracker->consume(block->allocated_bytes());
     int use_sender_id = _is_merging ? sender_id : 0;
     _sender_queues[use_sender_id]->add_block(block, use_move);
+    _queue_total_rows[use_sender_id] = _queue_total_rows[use_sender_id] + 
block->rows();
+    return could_eos_sink();
+}
+
+// the sink could eos early. when sink rows have reached limit for all queue, 
and no conjuncts to filters data.
+// in this way, we could eos sink as soon as possible, so could reduce sender 
total rows.
+bool VDataStreamRecvr::could_eos_sink() {

Review Comment:
   warning: method 'could_eos_sink' can be made const 
[readability-make-member-function-const]
   
   ```suggestion
   bool VDataStreamRecvr::could_eos_sink() const {
   ```
   
   be/src/vec/runtime/vdata_stream_recvr.h:121:
   ```diff
   -     bool could_eos_sink();
   +     bool could_eos_sink() const;
   ```
   



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