ajantha-bhat commented on code in PR #13329: URL: https://github.com/apache/iceberg/pull/13329#discussion_r2151951117
########## parquet/src/test/java/org/apache/iceberg/TestParquetPartitionStatsHandler.java: ########## @@ -18,9 +18,36 @@ */ package org.apache.iceberg; +import static org.assertj.core.api.Assertions.assertThatThrownBy; + +import org.apache.iceberg.io.CloseableIterable; +import org.apache.iceberg.relocated.com.google.common.collect.Lists; +import org.junit.jupiter.api.Test; + public class TestParquetPartitionStatsHandler extends PartitionStatsHandlerTestBase { public FileFormat format() { return FileFormat.PARQUET; } + + @Test + public void testReadingStatsWithInvalidSchema() throws Exception { + Table testTable = + TestTables.create(tempDir("old_schema"), "old_schema", SCHEMA, SPEC, 2, fileFormatProperty); + Schema schema = PartitionStatsHandler.schema(Partitioning.partitionType(testTable)); + + String invalidSchema = + getClass() + .getClassLoader() + .getResource("org/apache/iceberg/PartitionStatsInvalidSchema.parquet") Review Comment: We don't have old schema in code now. So, creating a parquet file as per old schema, adding rows etc will be a big chunk of code. I observed that we do maintain puffin files, delete files and metadata files in resource folder https://github.com/apache/iceberg/tree/main/core/src/test/resources/org/apache/iceberg Hence, I kept it to avoid PR code size. -- 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