perf: use roaring's range iter to speedup mask_to_offset_ranges (#6871)
The function `mask_to_offset_ranges` is used at scan planning time to determine which rows to read from the file. This was a bottleneck when the mask was the result of a zonal index search because the old implementation materialized all of the offsets only to convert them back into ranges. Luckily, roaring recently implemented a range-based iterator. Using this we can skip the materialization step. On my zonemap benchmark this doubles the speed of the search and, perhaps more importantly, removes a penalty I observed when the index is used even on queries that are not highly selective. Generated with the assistance of Claude code. --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
W
Weston Pace committed
3d85fc7c56ae641b0b07bb8793b6080959bb835a
Parent: 0f13993
Committed by GitHub <noreply@github.com>
on 5/21/2026, 5:52:03 PM