Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
dataroaring committed Dec 29, 2023
1 parent 258d742 commit 415a14f
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion be/src/olap/rowset/beta_rowset_reader.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,16 @@ class BetaRowsetReader : public RowsetReader {
bool _should_push_down_value_predicates() const;
bool _is_merge_iterator() const {
return _read_context->need_ordered_result &&
_rowset->rowset_meta()->is_segments_overlapping() && _segment_offsets.size() > 1;
_rowset->rowset_meta()->is_segments_overlapping() && _get_segment_num() > 1;
}

int32_t _get_segment_num() const {
auto [seg_start, seg_end] = _segment_offsets;
if (seg_start == seg_end) {
seg_start = 0;
seg_end = _rowset->num_segments();
}
return seg_end - seg_start;
}

DorisCallOnce<Status> _init_iter_once;
Expand Down

0 comments on commit 415a14f

Please sign in to comment.