danielcweeks commented on code in PR #6887:
URL: https://github.com/apache/iceberg/pull/6887#discussion_r1114851613


##########
core/src/main/java/org/apache/iceberg/avro/AvroIO.java:
##########
@@ -178,7 +179,7 @@ static long 
findStartingRowPos(Supplier<SeekableInputStream> open, long start) {
           SYNC_READER.read(decoder, blockSync);
 
           if (!Arrays.equals(fileSync, blockSync)) {
-            throw new RuntimeIOException("Invalid sync at %s", nextSyncPos);
+            throw new FileHandlingException("Invalid sync at %s", nextSyncPos);

Review Comment:
   We might be able to find a better exception for this.  I'm not clear on what 
this sync check is, but maybe there's something more appropriate we can use.



##########
core/src/main/java/org/apache/iceberg/avro/AvroFileAppender.java:
##########
@@ -85,7 +86,7 @@ public long length() {
         throw new RuntimeIOException(e, "Failed to get stream length");
       }
     }
-    throw new RuntimeIOException("Failed to get stream length: no open 
stream");
+    throw new FileHandlingException("Failed to get stream length: no open 
stream");

Review Comment:
   Could we change this to a precondition check as opposed to file exception?



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