pub(crate) fn row_selection_from_row_ranges(
row_ranges: impl Iterator<Item = Range<usize>>,
total_row_count: usize,
) -> RowSelectionExpand description
Converts an iterator of row ranges into a RowSelection by creating a sequence of RowSelectors.
This function processes each range in the input and either creates a new selector or merges with the existing one, depending on whether the current range is contiguous with the preceding one or if there’s a gap that requires skipping rows. It handles both “select” and “skip” actions, optimizing the list of selectors by merging contiguous actions of the same type.
Note: overlapping ranges are not supported and will result in an incorrect selection.