Kontinuation commented on code in PR #2971: URL: https://github.com/apache/parquet-java/pull/2971#discussion_r1958025698
########## parquet-hadoop/src/main/java/org/apache/parquet/format/converter/ParquetMetadataConverter.java: ########## @@ -875,6 +937,61 @@ public org.apache.parquet.column.statistics.Statistics fromParquetStatistics( return fromParquetStatisticsInternal(createdBy, statistics, type, expectedOrder); } + private GeospatialStatistics toParquetGeometryStatistics( + org.apache.parquet.column.statistics.geometry.GeospatialStatistics geospatialStatistics) { + if (geospatialStatistics == null) { + return null; + } + + GeospatialStatistics formatStats = new GeospatialStatistics(); + + if (geospatialStatistics.getBoundingBox() != null) { + formatStats.setBbox(toParquetBoundingBox(geospatialStatistics.getBoundingBox())); + } + + if (geospatialStatistics.getGeometryTypes() != null) { + List<Integer> geometryTypes = + new ArrayList<>(geospatialStatistics.getGeometryTypes().getTypes()); + Collections.sort(geometryTypes); + formatStats.setGeospatial_types(geometryTypes); + } + + return formatStats; + } + + static org.apache.parquet.column.statistics.geometry.GeospatialStatistics fromParquetStatistics( + GeospatialStatistics formatGeomStats, PrimitiveType type) { + org.apache.parquet.column.statistics.geometry.BoundingBox bbox = null; Review Comment: ```suggestion 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; ``` -- 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