pavibhai commented on code in PR #5778:
URL: https://github.com/apache/iceberg/pull/5778#discussion_r980515146


##########
orc/src/main/java/org/apache/iceberg/orc/OrcFileAppender.java:
##########
@@ -147,11 +146,12 @@ public long length() {
   @Override
   public List<Long> splitOffsets() {
     Preconditions.checkState(isClosed, "File is not yet closed");
-    try (Reader reader = ORC.newFileReader(file.toInputFile(), conf)) {
-      List<StripeInformation> stripes = reader.getStripes();
+    try {
+      List<StripeInformation> stripes = writer.getStripes();
       return Collections.unmodifiableList(Lists.transform(stripes, 
StripeInformation::getOffset));
     } catch (IOException e) {
-      throw new RuntimeIOException(e, "Can't close ORC reader %s", 
file.location());
+      throw new RuntimeIOException(
+          e, "Cannot receive stripe information from writer for %s", 
file.location());

Review Comment:
   Makes sense, will change.



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