zuochunwei commented on a change in pull request #8119: URL: https://github.com/apache/incubator-doris/pull/8119#discussion_r811678486
########## File path: be/src/vec/columns/column_complex.h ########## @@ -153,9 +153,15 @@ class ColumnComplexType final : public COWHelper<IColumn, ColumnComplexType<T>> void insert_indices_from(const IColumn& src, const int* indices_begin, const int* indices_end) override { const Self& src_vec = assert_cast<const Self&>(src); - data.reserve(size() + (indices_end - indices_begin)); - for (auto x = indices_begin; x != indices_end; ++x) { - data.push_back(src_vec.get_element(*x)); + auto new_size = indices_end - indices_begin; + + for (int i = 0; i < new_size; ++i) { + auto offset = *(indices_begin + i); Review comment: 这样改了真的更好么? ########## File path: be/src/vec/exec/join/vhash_join_node.cpp ########## @@ -345,7 +350,7 @@ struct ProcessHashTableProbe { for (auto it = mapped.begin(); it.ok(); ++it) { ++current_offset; for (size_t j = 0; j < _right_col_len; ++j) { - auto& column = *it->block->get_by_position(j).column; + auto& column = *_build_blocks[it->block_offset].get_by_position(j).column; Review comment: 与循环无关的计算(_build_blocks[it->block_offset].)提取到循环外吧,虽然O3可能会优化掉,但优化有一个原则是不过度依赖编译器的优化 ########## File path: be/src/vec/exec/vset_operation_node.h ########## @@ -184,7 +186,7 @@ struct HashTableProbe { void add_result_columns(RowRefList& value, int& block_size) { for (auto idx = _build_col_idx.begin(); idx != _build_col_idx.end(); ++idx) { - auto& column = *value.begin()->block->get_by_position(idx->first).column; + auto& column = *_build_blocks[value.begin()->block_offset].get_by_position(idx->first).column; Review comment: 如上 -- 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