yiguolei commented on code in PR #14163: URL: https://github.com/apache/doris/pull/14163#discussion_r1019737673
########## be/src/olap/tablet.cpp: ########## @@ -427,11 +427,16 @@ const RowsetSharedPtr Tablet::rowset_with_max_version() const { RowsetMetaSharedPtr Tablet::rowset_meta_with_max_schema_version( const std::vector<RowsetMetaSharedPtr>& rowset_metas) { - return *std::max_element(rowset_metas.begin(), rowset_metas.end(), - [](const RowsetMetaSharedPtr& a, const RowsetMetaSharedPtr& b) { - return a->tablet_schema()->schema_version() < - b->tablet_schema()->schema_version(); - }); + return *std::max_element( + rowset_metas.begin(), rowset_metas.end(), + [](const RowsetMetaSharedPtr& a, const RowsetMetaSharedPtr& b) { + return !a->tablet_schema() + ? true + : (!b->tablet_schema() + ? false + : a->tablet_schema()->schema_version() < + b->tablet_schema()->schema_version()); + }); } Review Comment: If all rowset meta do not have tablet schema, then the max rowset meta's _schema is nullptr, so that other method will core. -- 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