imay commented on a change in pull request #1931: Support segment zone map URL: https://github.com/apache/incubator-doris/pull/1931#discussion_r334042668
########## File path: be/src/olap/rowset/segment_v2/segment.cpp ########## @@ -50,17 +52,69 @@ Status Segment::open() { RETURN_IF_ERROR(Env::Default()->new_random_access_file(_fname, &_input_file)); // parse footer to get meta RETURN_IF_ERROR(_parse_footer()); - // parse short key index - RETURN_IF_ERROR(_parse_index()); - // initial all column reader - RETURN_IF_ERROR(_initial_column_readers()); + return Status::OK(); } -std::unique_ptr<SegmentIterator> Segment::new_iterator(const Schema& schema, const StorageReadOptions& read_options) { - auto it = std::unique_ptr<SegmentIterator>(new SegmentIterator(this->shared_from_this(), schema)); - it->init(read_options); - return it; +Status Segment::new_iterator( + const Schema& schema, + const StorageReadOptions& read_options, + std::unique_ptr<RowwiseIterator>* iter) { + + if (read_options.conditions != nullptr) { + for (auto& column_condition : read_options.conditions->columns()) { + int32_t column_id = column_condition.first; + auto entry = _column_id_to_footer_ordinal.find(column_id); + if (entry == _column_id_to_footer_ordinal.end()) { + continue; + } + auto& c_meta = _footer.columns(entry->second); + if (!c_meta.has_zone_map()) { + continue; + } + ZoneMapPB c_zone_map = c_meta.zone_map(); Review comment: ```suggestion auto& c_zone_map = c_meta.zone_map(); ``` ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org