lirui-apache commented on code in PR #13329:
URL: https://github.com/apache/iceberg/pull/13329#discussion_r2161052987


##########
core/src/main/java/org/apache/iceberg/PartitionStatsHandler.java:
##########
@@ -280,6 +273,8 @@ private static Collection<PartitionStats> 
computeAndMergeStatsIncremental(
       oldStats.forEach(
           partitionStats ->
               statsMap.put(partitionStats.specId(), 
partitionStats.partition(), partitionStats));
+    } catch (IllegalArgumentException | IllegalStateException exception) {

Review Comment:
   The idea was to make it easier for users to tell whether they are trying to 
read an invalid stats file. If we decide to treat any exception as 
`InvalidStatsFileException`, then it's indeed redundant.
   
   Maybe this doesn't matter for computing stats files, as we can always fall 
back to a full compute. But when reading stats files via the 
`readPartitionStatsFile` API, I think it's useful to tell if the failure is due 
to invalid file, or e.g. temporary IO issues, so that users can take different 
measures on these exceptions.



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