HappenLee commented on a change in pull request #8064: URL: https://github.com/apache/incubator-doris/pull/8064#discussion_r806688824
########## File path: be/src/vec/columns/column.h ########## @@ -171,6 +171,19 @@ class IColumn : public COW<IColumn> { /// All data will be inserted as single element virtual void insert_data(const char* pos, size_t length) = 0; + virtual void insert_many_fix_len_data(const char* pos, size_t num) { + LOG(FATAL) << "Method insert_many_fix_len_data is not supported for " << get_name(); + } + + virtual void insert_many_dict_data(const int32_t* data_array, size_t start_index, const uint32_t* start_offset_array, + const uint32_t* len_array, char* dict_data, size_t num) { + LOG(FATAL) << "Method insert_many_dict_data is not supported for " << get_name(); + } + + virtual void insert_many_binary_data(size_t num, char* data_array, uint32_t* len_array, uint32_t* start_offset_array) { Review comment: ```size_t num``` like other interface set last ########## File path: be/src/olap/rowset/segment_v2/binary_plain_page.h ########## @@ -238,48 +238,15 @@ class BinaryPlainPageDecoder : public PageDecoder { } const size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elems - _cur_idx)); - auto* dst_col_ptr = dst.get(); - if (dst->is_nullable()) { - auto nullable_column = assert_cast<vectorized::ColumnNullable*>(dst.get()); - dst_col_ptr = nullable_column->get_nested_column_ptr().get(); - // fill null bitmap here, not null; - for (int i = 0; i < max_fetch; i++) { - nullable_column->get_null_map_data().push_back(0); - } - } - - if (dst_col_ptr->is_bitmap()) { - auto& bitmap_column = reinterpret_cast<vectorized::ColumnBitmap&>(*dst_col_ptr); - for (size_t i = 0; i < max_fetch; i++, _cur_idx++) { - const uint32_t start_offset = offset(_cur_idx); - uint32_t len = offset(_cur_idx + 1) - start_offset; - - bitmap_column.insert_default(); - BitmapValue* pvalue = &bitmap_column.get_element(bitmap_column.size() - 1); - if (len != 0) { - BitmapValue value; - value.deserialize(&_data[start_offset]); - *pvalue = std::move(value); - } else { - *pvalue = std::move(*reinterpret_cast<BitmapValue*>(const_cast<char*>(&_data[start_offset]))); - } - } - } else if (dst_col_ptr->is_predicate_column()) { - // todo(wb) padding sv here for better comparison performance - for (size_t i = 0; i < max_fetch; i++, _cur_idx++) { - const uint32_t start_offset = offset(_cur_idx); - uint32_t len = offset(_cur_idx + 1) - start_offset; - StringValue sv(const_cast<char*>(&_data[start_offset]), len); - dst_col_ptr->insert_data(reinterpret_cast<char*>(&sv), 0); - } - } else { - for (size_t i = 0; i < max_fetch; i++, _cur_idx++) { - // todo(wb) need more test case and then improve here - const uint32_t start_offset = offset(_cur_idx); - uint32_t len = offset(_cur_idx + 1) - start_offset; - dst_col_ptr->insert_data(&_data[start_offset], len); - } + uint32_t len_array[max_fetch]; Review comment: format ########## File path: be/src/vec/columns/column_vector.h ########## @@ -212,11 +272,11 @@ class ColumnVector final : public COWHelper<ColumnVectorHelper, ColumnVector<T>> void insert_indices_from(const IColumn& src, const int* indices_begin, const int* indices_end) override; - void insert_elements(void* elements, size_t num) { + void batch_set_null_bitmap(uint8_t val, size_t num) { Review comment: look like same ase insert elements? why not use `insert_elements` ########## File path: be/src/olap/rowset/segment_v2/segment_iterator.cpp ########## @@ -943,9 +939,9 @@ Status SegmentIterator::next_batch(vectorized::Block* block) { _output_non_pred_columns(block, is_mem_reuse); // 4.2 output short circuit predicate column - _output_column_by_sel_idx(block, _short_cir_pred_column_ids, sel_rowid_idx, selected_size, is_mem_reuse); + return _output_column_by_sel_idx(block, _short_cir_pred_column_ids, sel_rowid_idx, selected_size, is_mem_reuse); Review comment: here return the vec_pred_column will not exec -- 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