You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@parquet.apache.org by GitBox <gi...@apache.org> on 2021/08/10 08:50:11 UTC

[GitHub] [parquet-mr] gszadovszky commented on a change in pull request #921: PARQUET-2064: Make Range public accessible in RowRanges

gszadovszky commented on a change in pull request #921:
URL: https://github.com/apache/parquet-mr/pull/921#discussion_r685822532



##########
File path: parquet-column/src/main/java/org/apache/parquet/internal/filter2/columnindex/RowRanges.java
##########
@@ -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<Range> getRanges() {
+    return ranges;

Review comment:
       I don't like returning `ranges` directly. This is a mutable list so the caller can modify it without any control. I would suggest wrapping it into an unmodifiable list.

##########
File path: parquet-column/src/main/java/org/apache/parquet/internal/filter2/columnindex/RowRanges.java
##########
@@ -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 long to;

Review comment:
       `to` should also be final.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@parquet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org