yangzhg commented on a change in pull request #6236: URL: https://github.com/apache/incubator-doris/pull/6236#discussion_r672764505
########## File path: be/src/olap/tablet.cpp ########## @@ -675,6 +676,62 @@ OLAPStatus Tablet::capture_rs_readers(const std::vector<Version>& version_path, return OLAP_SUCCESS; } +OLAPStatus Tablet::capture_rs_readers_by_range(const Version& spec_version, + vector<RowsetReaderSharedPtr>* rs_readers, + const std::vector<OlapScanRange*>& key_ranges, + std::shared_ptr<MemTracker> parent_tracker) { + std::set<RowsetId> rowsets; + bool has_segment_range = false; + for (auto key_range : key_ranges) { + if (key_range->range_type == ScanRangeType::SEGMENT) { + for (const auto& s : key_range->segments) { + rowsets.emplace(s.first); + } + has_segment_range = true; + } + } + if (!has_segment_range) { Review comment: if key_ranges have SEGMENT key range, it will have KEY key range -- 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