dataroaring commented on code in PR #11869: URL: https://github.com/apache/doris/pull/11869#discussion_r955599566
########## be/src/olap/tablet_meta.cpp: ########## @@ -579,6 +579,19 @@ Version TabletMeta::max_version() const { return max_version; } +// Find the rowset with specified version and return its schema +// Currently, this API is used by delete condition +const TabletSchemaSPtr TabletMeta::tablet_schema(Version version) const { + auto it = _rs_metas.begin(); + while (it != _rs_metas.end()) { + if ((*it)->version() == version) { + return (*it)->tablet_schema(); + } + ++it; + } Review Comment: _rs_version_map in Tablet is much more efficient. ########## be/src/olap/olap_cond.cpp: ########## @@ -537,7 +537,7 @@ bool CondColumn::eval(const segment_v2::BloomFilter* bf) const { Status Conditions::append_condition(const TCondition& tcond) { DCHECK(_schema != nullptr); - int32_t index = _schema->field_index(tcond.column_name); + int32_t index = _schema->field_index(tcond.column_unique_id); Review Comment: Should we hide index in the TabletSchema? We can use a function like this _schema->get_clolumn_by_unique_id(tcond.column_unique_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: 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