singhpk234 commented on code in PR #7267:
URL: https://github.com/apache/iceberg/pull/7267#discussion_r1170689053


##########
parquet/src/main/java/org/apache/iceberg/parquet/ParquetUtil.java:
##########
@@ -222,6 +222,19 @@ private static MessageType getParquetTypeWithIds(
     return ParquetSchemaUtil.addFallbackIds(type);
   }
 
+  /**
+   * Returns a list of offsets in ascending order determined by the starting 
position of the row
+   * groups.
+   */
+  public static List<Long> getSplitOffsets(InputFile file) {
+    try (ParquetFileReader reader = 
ParquetFileReader.open(ParquetIO.file(file))) {
+      ParquetMetadata md = reader.getFooter();
+      return getSplitOffsets(md);
+    } catch (IOException e) {
+      throw new RuntimeIOException(e, "Failed to read footer of file: %s", 
file);

Review Comment:
   [minor] should we throw `java.io.UncheckedIOException` instead considering 
we have marked RuntimeIOException as deprecated ? 



-- 
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