github-actions[bot] commented on code in PR #24735:
URL: https://github.com/apache/doris/pull/24735#discussion_r1335416785


##########
be/src/olap/rowset/segment_v2/segment_iterator.cpp:
##########
@@ -1622,8 +1618,45 @@ Status SegmentIterator::_read_columns_by_index(uint32_t 
nrows_read_limit, uint32
         }
 
         _split_row_ranges.emplace_back(std::pair {range_from, range_to});
-        // if _opts.read_orderby_key_reverse is true, only read one range for 
fast reverse purpose
+
+        _read_range_info.add(range_from, range_to);
     } while (nrows_read < nrows_read_limit && !_opts.read_orderby_key_reverse);
+
+    if (_read_range_info.ranges.empty()) {
+        return Status::OK();
+    }
+
+    int32_t threshold = 
_opts.runtime_state->query_options().inverted_index_read_mode_threshold;

Review Comment:
   warning: variable 'threshold' is not initialized 
[cppcoreguidelines-init-variables]
   
   ```suggestion
       int32_t threshold = 0 = 
_opts.runtime_state->query_options().inverted_index_read_mode_threshold;
   ```
   



-- 
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

Reply via email to