This is an automated email from the ASF dual-hosted git repository.
shangxinli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/parquet-mr.git
The following commit(s) were added to refs/heads/master by this push:
new b2fdd88 PARQUET-2064: Make Range public accessible in RowRanges (#918)
b2fdd88 is described below
commit b2fdd888133ddd82bddf82aa0836697506e24f55
Author: Xinli Shang <[email protected]>
AuthorDate: Mon Aug 9 08:30:50 2021 -0700
PARQUET-2064: Make Range public accessible in RowRanges (#918)
* PARQUET-2064: Make Range public accessible in RowRanges
* Add comments
* Move RowRange out of internal folder
* Revert "Move RowRange out of internal folder"
This reverts commit 4f49c044aca816ff844ff8634de73244fd77cd44.
---
.../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..743f42d 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 ranges;
+ }
+
@Override
public String toString() {
return ranges.toString();