yiguolei commented on code in PR #11131: URL: https://github.com/apache/doris/pull/11131#discussion_r930670691
########## be/src/olap/rowset/rowset_meta.h: ########## @@ -245,7 +251,14 @@ class RowsetMeta { void set_num_segments(int64_t num_segments) { _rowset_meta_pb.set_num_segments(num_segments); } - void to_rowset_pb(RowsetMetaPB* rs_meta_pb) const { *rs_meta_pb = _rowset_meta_pb; } + void to_rowset_pb(RowsetMetaPB* rs_meta_pb) const { + *rs_meta_pb = _rowset_meta_pb; + if (_schema) { + _schema->to_schema_pb(rs_meta_pb->mutable_tablet_schema()); + } + } + + // warning!don't use tablet_schema in rowset_meta_pb const RowsetMetaPB& get_rowset_pb() { return _rowset_meta_pb; } Review Comment: change to const RowsetMetaPB get_rowset_pb() and create a new pb here. -- 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: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org