This is an automated email from the ASF dual-hosted git repository. morningman pushed a commit to branch branch-1.2-lts in repository https://gitbox.apache.org/repos/asf/doris.git
commit 334007df95ec226438a09c4f7a36192b44f800d7 Author: Xin Liao <liaoxin...@126.com> AuthorDate: Sat Jul 15 17:17:41 2023 +0800 [fix](unique-key) fix query results show duplicate key for unique key table after upgrading (#21814) --- be/src/olap/rowset/beta_rowset_writer.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/be/src/olap/rowset/beta_rowset_writer.cpp b/be/src/olap/rowset/beta_rowset_writer.cpp index d2b761b5ed..69a3483905 100644 --- a/be/src/olap/rowset/beta_rowset_writer.cpp +++ b/be/src/olap/rowset/beta_rowset_writer.cpp @@ -845,7 +845,10 @@ void BetaRowsetWriter::_build_rowset_meta(std::shared_ptr<RowsetMeta> rowset_met ++itr) { segments_encoded_key_bounds.push_back(*itr); } - if (!_is_segment_overlapping(segments_encoded_key_bounds)) { + // segment key bounds are empty in old version(before version 1.2.x). So we should not modify + // the overlap property when key bounds are empty. + if (!segments_encoded_key_bounds.empty() && + !_is_segment_overlapping(segments_encoded_key_bounds)) { rowset_meta->set_segments_overlap(NONOVERLAPPING); } --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org