From e9c707588b6d4e38be823e9f9efa5d104cde1733 Mon Sep 17 00:00:00 2001 From: Xin Liao Date: Thu, 28 Mar 2024 17:28:49 +0800 Subject: [PATCH] [fix](merge-iterator) fix NOT_IMPLEMENTED_ERROR when read next block view (#32961) --- be/src/vec/olap/vgeneric_iterators.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/be/src/vec/olap/vgeneric_iterators.cpp b/be/src/vec/olap/vgeneric_iterators.cpp index 4b33da0364381f..b90ddf8ffb9b60 100644 --- a/be/src/vec/olap/vgeneric_iterators.cpp +++ b/be/src/vec/olap/vgeneric_iterators.cpp @@ -420,9 +420,9 @@ Status VUnionIterator::current_block_row_locations(std::vector* loc RowwiseIteratorUPtr new_merge_iterator(std::vector&& inputs, int sequence_id_idx, bool is_unique, bool is_reverse, uint64_t* merged_rows) { - if (inputs.size() == 1) { - return std::move(inputs[0]); - } + // when the size of inputs is 1, we also need to use VMergeIterator, because the + // next_block_view function only be implemented in VMergeIterator. The reason why + // the size of inputs is 1 is that the segment was filtered out by zone map or others. return std::make_unique(std::move(inputs), sequence_id_idx, is_unique, is_reverse, merged_rows); }