yiguolei commented on code in PR #28103: URL: https://github.com/apache/doris/pull/28103#discussion_r1435914069
########## be/src/olap/rowset/segment_v2/segment_iterator.cpp: ########## @@ -392,35 +396,57 @@ Status SegmentIterator::_get_row_ranges_by_keys() { DorisMetrics::instance()->segment_row_total->increment(num_rows()); // fast path for empty segment or empty key ranges - if (_row_bitmap.isEmpty() || _opts.key_ranges.empty()) { - return Status::OK(); - } - - // Read & seek key columns is a waste of time when no key column in _schema - if (std::none_of(_schema->columns().begin(), _schema->columns().end(), [&](const Field* col) { - return col && _opts.tablet_schema->column_by_uid(col->unique_id()).is_key(); - })) { + if (_row_bitmap.isEmpty() || (!_opts.split_key_range.valid && _opts.key_ranges.empty())) { return Status::OK(); } RowRanges result_ranges; - for (auto& key_range : _opts.key_ranges) { + if (_opts.split_key_range.valid) { Review Comment: key rangeļ¼ 1. scan key keyrange 2. where short key ---> key range add comment -- 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