jacktengg commented on code in PR #69776:
URL: https://github.com/apache/doris/pull/69776#discussion_r4435519287
##########
be/src/storage/segment/segment_iterator.cpp:
##########
@@ -1282,6 +1281,75 @@ Status SegmentIterator::_apply_ann_topn_predicate() {
return Status::OK();
}
+void SegmentIterator::_reset_range_iterator() {
+ // TopN pruning can replace the bitmap between batches. Refresh the cached
cardinality with
+ // the cursor so batch sizing does not use the larger range from before
the bound arrived.
+ _row_bitmap_cardinality = _row_bitmap.cardinality();
+ if (_opts.read_orderby_key_reverse) {
+ _range_iter.reset(new BackwardBitmapRangeIterator(_row_bitmap));
+ } else {
+ _range_iter.reset(new BitmapRangeIterator(_row_bitmap));
+ }
+}
+
+Status SegmentIterator::_update_topn_runtime_filter_ranges() {
+ // Apply the first bound immediately and throttle later changes by raw
rows read.
Review Comment:
Legacy issue, not introduced by this pr, not opt for now.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]