diff --git a/parquet-column/src/main/java/org/apache/parquet/internal/filter2/columnindex/RowRanges.java b/parquet-column/src/main/java/org/apache/parquet/internal/filter2/columnindex/RowRanges.java index cf6a1cadd9..52a8e50926 100644 --- a/parquet-column/src/main/java/org/apache/parquet/internal/filter2/columnindex/RowRanges.java +++ b/parquet-column/src/main/java/org/apache/parquet/internal/filter2/columnindex/RowRanges.java @@ -37,7 +37,8 @@ * @see ColumnIndexFilter#calculateRowRanges(Filter, ColumnIndexStore, Set, long) */ public class RowRanges { - private static class Range { + // Make it public because some uppler layer application need to access it + public static class Range { // Returns the union of the two ranges or null if there are elements between them. private static Range union(Range left, Range right) { @@ -63,8 +64,8 @@ private static Range intersection(Range left, Range right) { return null; } - final long from; - final long to; + public final long from; + public final long to; // Creates a range of [from, to] (from and to are inclusive; empty ranges are not valid) Range(long from, long to) { @@ -299,6 +300,10 @@ public boolean isOverlapping(long from, long to) { (r1, r2) -> r1.isBefore(r2) ? -1 : r1.isAfter(r2) ? 1 : 0) >= 0; } + public List getRanges() { + return Collections.unmodifiableList(ranges); + } + @Override public String toString() { return ranges.toString();