Tanya-W commented on code in PR #19063: URL: https://github.com/apache/doris/pull/19063#discussion_r1201760753
########## be/src/olap/tablet.cpp: ########## @@ -1286,6 +1286,37 @@ std::vector<RowsetSharedPtr> Tablet::pick_candidate_rowsets_to_base_compaction() return candidate_rowsets; } +std::vector<RowsetSharedPtr> Tablet::pick_candidate_rowsets_to_build_inverted_index( + const std::vector<int32_t>& alter_column_uids, bool is_drop_op) { + std::vector<RowsetSharedPtr> candidate_rowsets; + { + std::shared_lock rlock(_meta_lock); + auto has_alter_inverted_index = [&](RowsetSharedPtr rowset) -> bool { + for (const auto& col_uid : alter_column_uids) { + if (rowset->tablet_schema()->has_inverted_index(col_uid)) { + return true; + } + } + return false; + }; + + for (const auto& [version, rs] : _rs_version_map) { + if (!has_alter_inverted_index(rs) && is_drop_op) { + continue; + } + if (has_alter_inverted_index(rs) && !is_drop_op) { + continue; + } + + if (rs->is_local()) { Review Comment: s3 cannot do link file, the cold data need dependent on compaction to create index -- 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