[Optimize](point query) clear names to reduce mem consumption and cpu cost related to block column name (#26931)
This commit is contained in:
@ -48,7 +48,7 @@
|
||||
namespace doris {
|
||||
|
||||
Reusable::~Reusable() {}
|
||||
constexpr static int s_preallocted_blocks_num = 64;
|
||||
constexpr static int s_preallocted_blocks_num = 32;
|
||||
Status Reusable::init(const TDescriptorTable& t_desc_tbl, const std::vector<TExpr>& output_exprs,
|
||||
size_t block_size) {
|
||||
SCOPED_MEM_COUNT_BY_HOOK(&_mem_size);
|
||||
@ -334,6 +334,7 @@ Status PointQueryExecutor::_lookup_row_data() {
|
||||
template <typename MysqlWriter>
|
||||
Status _serialize_block(MysqlWriter& mysql_writer, vectorized::Block& block,
|
||||
PTabletKeyLookupResponse* response) {
|
||||
block.clear_names();
|
||||
RETURN_IF_ERROR(mysql_writer.append_block(block));
|
||||
assert(mysql_writer.results().size() == 1);
|
||||
uint8_t* buf = nullptr;
|
||||
|
||||
@ -178,6 +178,9 @@ void Block::insert(size_t position, ColumnWithTypeAndName&& elem) {
|
||||
|
||||
void Block::clear_names() {
|
||||
index_by_name.clear();
|
||||
for (auto& entry : data) {
|
||||
entry.name.clear();
|
||||
}
|
||||
}
|
||||
|
||||
void Block::insert(const ColumnWithTypeAndName& elem) {
|
||||
|
||||
Reference in New Issue
Block a user