Kontinuation commented on PR #2971: URL: https://github.com/apache/parquet-java/pull/2971#issuecomment-2662708995
I am depending on this PR to build geo support for iceberg. I got lots of test failures when building this branch locally: ``` java.lang.NullPointerException at org.apache.parquet.format.converter.ParquetMetadataConverter.fromParquetStatistics(ParquetMetadataConverter.java:965) at org.apache.parquet.format.converter.ParquetMetadataConverter.buildColumnChunkMetaData(ParquetMetadataConverter.java:1750) at org.apache.parquet.format.converter.ParquetMetadataConverter.fromParquetMetadata(ParquetMetadataConverter.java:1848) at org.apache.parquet.format.converter.ParquetMetadataConverter.readParquetMetadata(ParquetMetadataConverter.java:1728) at org.apache.parquet.hadoop.ParquetFileReader.readFooter(ParquetFileReader.java:629) at org.apache.parquet.hadoop.ParquetFileReader.<init>(ParquetFileReader.java:934) at org.apache.parquet.hadoop.ParquetFileReader.<init>(ParquetFileReader.java:925) at org.apache.parquet.hadoop.ParquetFileReader.open(ParquetFileReader.java:698) ``` NPE is thrown when reading parquet files without geo columns. Can we apply the following patch to resolve this problem? ```diff diff --git a/parquet-hadoop/src/main/java/org/apache/parquet/format/converter/ParquetMetadataConverter.java b/parquet-hadoop/src/main/java/org/apache/parquet/format/converter/ParquetMetadataConverter.java index 3efc9345..22e51783 100644 --- a/parquet-hadoop/src/main/java/org/apache/parquet/format/converter/ParquetMetadataConverter.java +++ b/parquet-hadoop/src/main/java/org/apache/parquet/format/converter/ParquetMetadataConverter.java @@ -961,6 +961,9 @@ public class ParquetMetadataConverter { static org.apache.parquet.column.statistics.geometry.GeospatialStatistics fromParquetStatistics( GeospatialStatistics formatGeomStats, PrimitiveType type) { + if (formatGeomStats == null) { + return null; + } org.apache.parquet.column.statistics.geometry.BoundingBox bbox = null; if (formatGeomStats.isSetBbox()) { BoundingBox formatBbox = formatGeomStats.getBbox(); ``` -- 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...@parquet.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@parquet.apache.org For additional commands, e-mail: issues-h...@parquet.apache.org