parquet-column/src/main/java/org/apache/parquet/internal/filter2/columnindex/RowRanges.java
static RowRanges create(long rowCount, PrimitiveIterator.OfInt pageIndexes, OffsetIndex offsetIndex) {
    RowRanges ranges = new RowRanges();
    while (pageIndexes.hasNext()) {
      int pageIndex = pageIndexes.nextInt();
      ranges.add(new Range(offsetIndex.getFirstRowIndex(pageIndex), offsetIndex.getLastRowIndex(pageIndex, rowCount)));
    }
    return ranges;
  }
static RowRanges create(long rowCount, PrimitiveIterator.OfInt pageIndexes, OffsetIndex offsetIndex) {
    RowRanges ranges = new RowRanges();
    while (pageIndexes.hasNext()) {
      int pageIndex = pageIndexes.nextInt();
      ranges.add(new Range(offsetIndex.getFirstRowIndex(pageIndex), offsetIndex.getLastRowIndex(pageIndex, rowCount)));
    }
    return ranges;
  }
/*
Creates a new RowRanges object with the following ranges.
[firstRowIndex[0], lastRowIndex[0]],
[firstRowIndex[1], lastRowIndex[1]],
...,
[firstRowIndex[n], lastRowIndex[n]]
(See OffsetIndex.getFirstRowIndex and OffsetIndex.getLastRowIndex for details.)

The union of the ranges are calculated so the result ranges always contain the disjunct ranges. See union for
details.