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


##########
be/src/vec/exec/scan/pip_scanner_context.h:
##########
@@ -95,18 +132,86 @@ class PipScannerContext : public 
vectorized::ScannerContext {
             _queue_mutexs.emplace_back(new std::mutex);
             _blocks_queues.emplace_back(std::list<vectorized::BlockUPtr>());
         }
+        if (_need_colocate_distribute) {
+            int real_block_size =
+                    limit == -1 ? _batch_size : 
std::min(static_cast<int64_t>(_batch_size), limit);
+            int64_t free_blocks_memory_usage = 0;
+            for (int i = 0; i < _max_queue_size; ++i) {
+                auto block = 
std::make_unique<vectorized::Block>(_output_tuple_desc->slots(),
+                                                                 
real_block_size,
+                                                                 true /*ignore 
invalid slots*/);
+                free_blocks_memory_usage += block->allocated_bytes();
+                _colocate_mutable_blocks.emplace_back(new 
vectorized::MutableBlock(block.get()));
+                _colocate_blocks.emplace_back(std::move(block));
+                _colocate_block_mutexs.emplace_back(new std::mutex);
+            }
+            _free_blocks_memory_usage->add(free_blocks_memory_usage);
+        }
     }
 
     bool has_enough_space_in_blocks_queue() const override {
         return _current_used_bytes < _max_bytes_in_queue / 2 * _max_queue_size;
     }
 
+    virtual void _dispose_coloate_blocks_not_in_queue() override {

Review Comment:
   warning: 'virtual' is redundant since the function is already declared 
'override' [modernize-use-override]
   
   ```suggestion
       void _dispose_coloate_blocks_not_in_queue() override {
   ```
   



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