public static RowRanges calculateRowRanges(
      FilterCompat.Filter filter, ColumnIndexStore columnIndexStore, Set<ColumnPath> paths, long rowCount) {
    return filter.accept(new FilterCompat.Visitor<RowRanges>() {
      @Override
      public RowRanges visit(FilterPredicateCompat filterPredicateCompat) {
        try {
          return filterPredicateCompat
              .getFilterPredicate()
              .accept(new ColumnIndexFilter(columnIndexStore, paths, rowCount));
        } catch (MissingOffsetIndexException e) {
          LOGGER.info(e.getMessage());
          return RowRanges.createSingle(rowCount);
        }
      }

      @Override
      public RowRanges visit(UnboundRecordFilterCompat unboundRecordFilterCompat) {
        return RowRanges.createSingle(rowCount);
      }

      @Override
      public RowRanges visit(NoOpFilter noOpFilter) {
        return RowRanges.createSingle(rowCount);
      }
    });
  }
@Test
  public void testFilteringWithMissingOffsetIndex() {
    Set<ColumnPath> paths = paths("column1", "column2", "column3", "column4", "column_wo_oi");

    assertAllRows(
        calculateRowRanges(
            FilterCompat.get(and(
                and(gtEq(intColumn("column1"), 7), lt(intColumn("column1"), 11)),
                and(
                    gt(binaryColumn("column2"), fromString("Romeo")),
                    ltEq(binaryColumn("column_wo_oi"), fromString("Tango"))))),
            STORE,
            paths,
            TOTAL_ROW_COUNT),
        TOTAL_ROW_COUNT);
  }