You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Enhancement] Make the segment iterator reusable across scans
Add the segment-layer machinery for reusing a SegmentIterator across multiple
scans instead of building a fresh one each time, plus the prepared-scan-range
plumbing that a reused iterator consumes:
- SegmentIterator::reset_for_reuse() / _init_reused_scan() and a one-time-setup
split (ScanContext::reset, _init_scan_range_and_context, _one_time_setup_done)
so per-scan state is reset while the expensive one-time setup is preserved;
- Segment::new_reusable_iterator() + new_reusable_segment_iterator();
- NonClosingChunkIterator so a finishing driver does not tear down the shared
reused iterator;
- SegmentReadStateCache on SegmentReadOptions and _apply_precomputed_scan_range()
so a reused iterator can skip re-pruning when a precomputed scan range is
supplied, plus the _get_prepared_pruned_row_ranges() helper that computes it;
- BitmapIndexEvaluator::init() idempotency reset so it can be re-initialized on
reuse.
Infrastructure only: nothing populates the read-state cache or calls
reset_for_reuse yet (the lake prepared physical split scan follow-ups do). No
behavior change on the existing scan path.
Signed-off-by: stephen <stephen5217@163.com>
0 commit comments