From a2fa0b3745fd442cb32fb691f923c240c835c64e Mon Sep 17 00:00:00 2001 From: lihangyu <15605149486@163.com> Date: Thu, 30 Nov 2023 21:24:59 +0800 Subject: [PATCH] [compability](segment) fix compability issue introduced by #27676 (#27799) Prior to PR #27676, data was written with empty path information. Consequently, after implementing #27676, data that already exists in a segment is not included in `column_id_to_footer_ordinal`. This issue will lead to `invalid nonexistent column without default value` error. --- be/src/olap/rowset/segment_v2/segment.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/be/src/olap/rowset/segment_v2/segment.cpp b/be/src/olap/rowset/segment_v2/segment.cpp index 32e4683576..c7bda4d3ad 100644 --- a/be/src/olap/rowset/segment_v2/segment.cpp +++ b/be/src/olap/rowset/segment_v2/segment.cpp @@ -360,7 +360,8 @@ Status Segment::_create_column_readers(const SegmentFooterPB& footer) { vectorized::PathInData path; path.from_protobuf(column_pb.column_path_info()); column_path_to_footer_ordinal.emplace(path, ordinal); - } else { + } + if (column_pb.has_unique_id()) { // unique id column_id_to_footer_ordinal.emplace(column_pb.unique_id(), ordinal); }