This is an automated email from the ASF dual-hosted git repository.
gabor pushed a commit to branch parquet-1.12.x
in repository https://gitbox.apache.org/repos/asf/parquet-mr.git
The following commit(s) were added to refs/heads/parquet-1.12.x by this push:
new 49f40a3 PARQUET-2064: Make Range public accessible in RowRanges (#921)
49f40a3 is described below
commit 49f40a359cc317e0c83953e285446020c78da579
Author: Xinli Shang <[email protected]>
AuthorDate: Mon Aug 16 02:24:30 2021 -0700
PARQUET-2064: Make Range public accessible in RowRanges (#921)
---
.../parquet/internal/filter2/columnindex/RowRanges.java | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
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 cf6a1ca..52a8e50 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 @@ import
org.apache.parquet.internal.column.columnindex.OffsetIndex;
* @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 @@ public class RowRanges {
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 class RowRanges {
(r1, r2) -> r1.isBefore(r2) ? -1 : r1.isAfter(r2) ? 1 : 0) >= 0;
}
+ public List<Range> getRanges() {
+ return Collections.unmodifiableList(ranges);
+ }
+
@Override
public String toString() {
return ranges.toString();