rdblue commented on a change in pull request #1335:
URL: https://github.com/apache/iceberg/pull/1335#discussion_r470918168
##########
File path: parquet/src/main/java/org/apache/iceberg/parquet/ParquetUtil.java
##########
@@ -86,15 +95,23 @@ public static Metrics footerMetrics(ParquetMetadata
metadata, MetricsConfig metr
Map<Integer, Literal<?>> upperBounds = Maps.newHashMap();
Set<Integer> missingStats = Sets.newHashSet();
- MessageType parquetType = metadata.getFileMetaData().getSchema();
- Schema fileSchema = ParquetSchemaUtil.convert(parquetType);
+ // ignore metrics for fields we failed to determine reliable IDs
+ MessageType parquetTypeWithIds = getParquetTypeWithIds(metadata,
nameMapping);
+ Schema fileSchema = ParquetSchemaUtil.convert(parquetTypeWithIds, name ->
null);
Review comment:
Actually, I guess that isn't really the same thing because pruning will
remove any fields with no children. This is probably okay, but it would be nice
to have a name for this. What about `convertTopLevel`?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]