kangpinghuang commented on a change in pull request #1633: add zone map 
page(#1390)
URL: https://github.com/apache/incubator-doris/pull/1633#discussion_r316638256
 
 

 ##########
 File path: be/src/olap/rowset/segment_v2/segment_iterator.cpp
 ##########
 @@ -45,16 +47,21 @@ SegmentIterator::~SegmentIterator() {
 }
 
 Status SegmentIterator::init(const StorageReadOptions& opts) {
+    DorisMetrics::segment_read_total.increment(1);
     _opts = opts;
     RETURN_IF_ERROR(_init_short_key_range());
+    RETURN_IF_ERROR(_init_row_ranges());
     RETURN_IF_ERROR(_init_column_iterators());
     return Status::OK();
 }
 
 // This function will use input key bounds to get a row range.
 Status SegmentIterator::_init_short_key_range() {
+    DorisMetrics::segment_row_total.increment(num_rows());
     _lower_rowid = 0;
     _upper_rowid = num_rows();
+    // initial short key row ranges: [0, num_rows())
+    _row_ranges = RowRanges::create_single(_lower_rowid, _upper_rowid);
 
 Review comment:
   yes, when _opts.lower_bound == nullptr && _opts.upper_bound == nullptr is 
true, we should read the whole segment with row ranges [0, num_rows)

----------------------------------------------------------------
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: dev-unsubscr...@doris.apache.org
For additional commands, e-mail: dev-h...@doris.apache.org

Reply via email to