parquet-hadoop/src/main/java/org/apache/parquet/hadoop/ColumnIndexFilterUtils.java
static OffsetIndex filterOffsetIndex(OffsetIndex offsetIndex, RowRanges rowRanges, long totalRowCount) {
    IntList indexMap = new IntArrayList();
    for (int i = 0, n = offsetIndex.getPageCount(); i < n; ++i) {
      long from = offsetIndex.getFirstRowIndex(i);
      if (rowRanges.isOverlapping(from, offsetIndex.getLastRowIndex(i, totalRowCount))) {
        indexMap.add(i);
      }
    }
    return new FilteredOffsetIndex(offsetIndex, indexMap.toIntArray());
  }
static OffsetIndex filterOffsetIndex(OffsetIndex offsetIndex, RowRanges rowRanges, long totalRowCount) {
    IntList indexMap = new IntArrayList();
    for (int i = 0, n = offsetIndex.getPageCount(); i < n; ++i) {
      long from = offsetIndex.getFirstRowIndex(i);
      if (rowRanges.isOverlapping(from, offsetIndex.getLastRowIndex(i, totalRowCount))) {
        indexMap.add(i);
      }
    }
    return new FilteredOffsetIndex(offsetIndex, indexMap.toIntArray());
  }
static OffsetIndex filterOffsetIndex ( OffsetIndex offsetIndex , RowRanges rowRanges , long totalRowCount ) { IntList indexMap = new IntArrayList ( ) ; for ( int i = 0 , n = offsetIndex . getPageCount ( ) ; i < n ; ++ i ) { long from = offsetIndex . getFirstRowIndex ( i ) ; if ( rowRanges . isOverlapping ( from , offsetIndex . getLastRowIndex ( i , totalRowCount ) ) ) { indexMap . add ( i ) ; } } return new FilteredOffsetIndex ( offsetIndex , indexMap . toIntArray ( ) ) ; }
/*
Returns the filtered offset index containing only the pages which are overlapping with rowRanges.
/ * Returns the filtered offset index containing only the pages which are overlapping with rowRanges .