yiguolei commented on code in PR #62835:
URL: https://github.com/apache/doris/pull/62835#discussion_r3143176453


##########
be/src/exec/scan/scanner.cpp:
##########
@@ -87,24 +87,16 @@ Status Scanner::get_block_after_projects(RuntimeState* 
state, Block* block, bool
         } else {
             
_origin_block.clear_column_data(row_descriptor.num_materialized_slots());
             const auto min_batch_size = std::max(state->batch_size() / 2, 1);
-            // For LOAD queries, use load_reader_max_block_bytes as the 
byte-based
-            // upper bound for block accumulation, so small blocks can still be
-            // merged to a reasonable size without exceeding the memory limit.
-            const int64_t load_max_bytes = (state->query_type() == 
TQueryType::LOAD &&
-                                            
config::load_reader_max_block_bytes > 0)
-                                                   ? 
config::load_reader_max_block_bytes
-                                                   : 0;
-            while (_padding_block.rows() < min_batch_size && !*eos) {
-                if (load_max_bytes > 0 &&
-                    static_cast<int64_t>(_padding_block.bytes()) >= 
load_max_bytes) {
-                    break;
-                }
+            const auto block_max_bytes = state->preferred_block_size_bytes();
+            while (_padding_block.rows() < min_batch_size &&

Review Comment:
   这段代码可以简化,我们可以适当允许超过block max bytes的方式,把代码写的更加简洁一些,现在这个eos 
被设置为true了,然后还可以再设置为false,有点绕了



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