yiguolei commented on code in PR #10136: URL: https://github.com/apache/doris/pull/10136#discussion_r912443030
########## be/src/olap/compaction.cpp: ########## @@ -138,8 +138,21 @@ Status Compaction::do_compaction_impl(int64_t permits) { LOG(INFO) << "start " << merge_type << compaction_name() << ". tablet=" << _tablet->full_name() << ", output_version=" << _output_version << ", permits: " << permits; + const TabletSchema* cur_tablet_schema = nullptr; + if (_input_rowsets.front()->rowset_meta()->tablet_schema() == nullptr) { + cur_tablet_schema = &(_tablet->tablet_schema()); + } else { + // get cur schema if rowset schema exist, rowset schema must be newer than tablet schema + auto max_version_rowset = Review Comment: rowset with max version may not have the latest tablet schema. -- 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