ajantha-bhat commented on code in PR #13329: URL: https://github.com/apache/iceberg/pull/13329#discussion_r2151920350
########## core/src/main/java/org/apache/iceberg/PartitionStatsHandler.java: ########## @@ -280,6 +304,8 @@ private static Collection<PartitionStats> computeAndMergeStatsIncremental( oldStats.forEach( partitionStats -> statsMap.put(partitionStats.specId(), partitionStats.partition(), partitionStats)); + } catch (IllegalArgumentException | IllegalStateException exception) { Review Comment: callstack for parquet ``` Not a primitive type: struct<1000: c2: optional string, 1001: c3: optional string> java.lang.IllegalArgumentException: Not a primitive type: struct<1000: c2: optional string, 1001: c3: optional string> at org.apache.iceberg.types.Type.asPrimitiveType(Type.java:73) at org.apache.iceberg.parquet.TypeWithSchemaVisitor.visit(TypeWithSchemaVisitor.java:53) at org.apache.iceberg.parquet.TypeWithSchemaVisitor.visitField(TypeWithSchemaVisitor.java:192) at org.apache.iceberg.parquet.TypeWithSchemaVisitor.visitFields(TypeWithSchemaVisitor.java:207) at org.apache.iceberg.parquet.TypeWithSchemaVisitor.visit(TypeWithSchemaVisitor.java:49) at org.apache.iceberg.parquet.ParquetSchemaUtil.pruneColumns(ParquetSchemaUtil.java:134) at org.apache.iceberg.parquet.ReadConf.<init>(ReadConf.java:82) at org.apache.iceberg.parquet.ParquetReader.init(ParquetReader.java:74) at org.apache.iceberg.parquet.ParquetReader.iterator(ParquetReader.java:94) at org.apache.iceberg.io.CloseableIterable$7$1.<init>(CloseableIterable.java:205) at org.apache.iceberg.io.CloseableIterable$7.iterator(CloseableIterable.java:204) at org.apache.iceberg.io.CloseableIterable$7.iterator(CloseableIterable.java:196) at org.apache.iceberg.relocated.com.google.common.collect.Lists.newArrayList(Lists.java:139) at org.apache.iceberg.TestParquetPartitionStatsHandler.testStatsWithInvalidSchema(TestParquetPartitionStatsHandler.java:45) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at java.base/java.util.ArrayList.forEach(ArrayList.java:1541) at java.base/java.util.ArrayList.forEach(ArrayList.java:1541) ``` callstack for avro ``` java.lang.IllegalStateException: Not an instance of org.apache.iceberg.StructLike: 0 at org.apache.iceberg.data.GenericRecord.get(GenericRecord.java:138) at org.apache.iceberg.PartitionStatsHandler.recordToPartitionStats(PartitionStatsHandler.java:266) at org.apache.iceberg.io.CloseableIterable$7$1.next(CloseableIterable.java:219) ...(99 remaining lines not displayed - this can be changed with Assertions.setMaxStackTraceElementsDisplayed) at org.apache.iceberg.avro.TestAvroPartitionStatsHandler.testReadingStatsWithInvalidSchema(TestAvroPartitionStatsHandler.java:57) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at java.base/java.util.ArrayList.forEach(ArrayList.java:1541) at java.base/java.util.ArrayList.forEach(ArrayList.java:1541) ``` or should I just catch `RuntimeException` here? -- 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: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org