[improvement](vectorized) Merge block in scanner to speed up query with conjunct (#8395)
This commit is contained in:
@ -24,7 +24,6 @@
|
||||
#include "vec/core/materialize_block.h"
|
||||
#include "vec/exprs/vexpr.h"
|
||||
#include "vec/exprs/vexpr_context.h"
|
||||
#include "vec/functions/simple_function_factory.h"
|
||||
#include "vec/utils/util.hpp"
|
||||
|
||||
namespace doris::vectorized {
|
||||
|
||||
@ -221,7 +221,14 @@ void VOlapScanNode::scanner_thread(VOlapScanner* scanner) {
|
||||
std::lock_guard<std::mutex> l(_free_blocks_lock);
|
||||
_free_blocks.emplace_back(block);
|
||||
} else {
|
||||
blocks.push_back(block);
|
||||
if (!blocks.empty() && blocks.back()->rows() + block->rows() <= _runtime_state->batch_size()) {
|
||||
MutableBlock(blocks.back()).merge(*block);
|
||||
block->clear_column_data();
|
||||
std::lock_guard<std::mutex> l(_free_blocks_lock);
|
||||
_free_blocks.emplace_back(block);
|
||||
} else {
|
||||
blocks.push_back(block);
|
||||
}
|
||||
}
|
||||
raw_rows_read = scanner->raw_rows_read();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user