yiguolei commented on code in PR #10136:
URL: https://github.com/apache/doris/pull/10136#discussion_r912441824
##########
be/src/olap/rowset/beta_rowset.cpp:
##########
@@ -54,11 +54,12 @@ Status BetaRowset::do_load(bool /*use_cache*/) {
return Status::OK();
}
-Status BetaRowset::load_segments(std::vector<segment_v2::SegmentSharedPtr>*
segments) {
+Status BetaRowset::load_segments(std::vector<segment_v2::SegmentSharedPtr>*
segments,
+ const TabletSchema* read_tablet_schema) {
for (int seg_id = 0; seg_id < num_segments(); ++seg_id) {
Review Comment:
Why segment should related with the input schema? Actually segment or rowset
has its own schema.
##########
be/src/olap/rowset/rowset.cpp:
##########
@@ -35,6 +34,12 @@ Rowset::Rowset(const TabletSchema* schema, const
FilePathDesc& rowset_path_desc,
Version version = _rowset_meta->version();
_is_cumulative = version.first != version.second;
}
+ // build schema from RowsetMeta.tablet_schema or Tablet.tablet_schema
+ if (_rowset_meta->tablet_schema() != nullptr) {
Review Comment:
I find there are some logic that check whether the rowset has tablet schema.
Why not add tablet meta to all rowset during data_dir.load()?
Then we do not need deal with these if else logic.
--
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]