eldenmoon commented on code in PR #57702:
URL: https://github.com/apache/doris/pull/57702#discussion_r2558696382
##########
be/src/olap/rowset/segment_v2/segment.cpp:
##########
@@ -681,16 +635,12 @@ Status
Segment::_create_column_meta_once(OlapReaderStatistics* stats) {
}
Status Segment::_create_column_meta(const SegmentFooterPB& footer) {
- // unique_id -> idx in footer.columns()
- uint32_t ordinal = 0;
- for (const auto& column_meta : footer.columns()) {
- // no need to create column reader for variant's subcolumn
- if (column_meta.unique_id() == -1) {
- ordinal++;
- continue;
- }
- _column_uid_to_footer_ordinal.try_emplace(column_meta.unique_id(),
ordinal++);
- }
+ // Build uid -> col_id mapping used to locate per-column meta.
+ // The concrete layout (inline vs external CMO) is handled by
ColumnMetaAccessor.
+ _column_uid_to_footer_ordinal.clear();
+ ColumnMetaAccessor accessor;
+ RETURN_IF_ERROR(accessor.init(footer, _file_reader));
+
RETURN_IF_ERROR(accessor.build_uid_to_colid_map(&_column_uid_to_footer_ordinal));
Review Comment:
统一成_column_uid_to_column_id
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]