ajantha-bhat commented on code in PR #6887:
URL: https://github.com/apache/iceberg/pull/6887#discussion_r1115773074


##########
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:
   Avro itself throws direct IOException for invalid sync cases as we can see 
here
   
   
https://github.com/apache/avro/blob/5548c9dff7a3bd851eacc791b52b21804f9f8408/lang/java/avro/src/main/java/org/apache/avro/file/DataFileStream.java#L330-L332
   
   So, I too changed this now to use just IOException



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