mukund-thakur commented on code in PR #15973:
URL: https://github.com/apache/iceberg/pull/15973#discussion_r3088224566


##########
parquet/src/main/java/org/apache/iceberg/parquet/ParquetIO.java:
##########
@@ -181,24 +180,22 @@ public void readVectored(List<ParquetFileRange> ranges, 
ByteBufferAllocator allo
       delegate.readVectored(delegateRange, allocate::allocate);
     }
 
+    /**
+     * convert parquet file ranges to iceberg file range.
+     *
+     * @param ranges input parquet file range.
+     * @return iceberg file range list.
+     */
     private static List<FileRange> convertRanges(List<ParquetFileRange> 
ranges) {
       return ranges.stream()
           .map(
               parquetFileRange -> {
                 CompletableFuture<ByteBuffer> future = new 
CompletableFuture<>();
                 parquetFileRange.setDataReadFuture(future);
-                try {
-                  return new FileRange(
-                      parquetFileRange.getDataReadFuture(),
-                      parquetFileRange.getOffset(),
-                      parquetFileRange.getLength());
-                } catch (EOFException e) {
-                  throw new RuntimeIOException(
-                      e,
-                      "Failed to create range file for offset: %s and length: 
%s",
-                      parquetFileRange.getOffset(),
-                      parquetFileRange.getLength());
-                }
+                return new FileRange(
+                    parquetFileRange.getDataReadFuture(),

Review Comment:
   sorry don't fully understand this. We still have to call setDataReadFuture 
such that actual reader can populate the buffers later. 
   and yes we can directly use the future in the constructor though. 



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to