danielcweeks commented on code in PR #12476: URL: https://github.com/apache/iceberg/pull/12476#discussion_r1992257554
########## core/src/main/java/org/apache/iceberg/ManifestReader.java: ########## @@ -133,12 +131,18 @@ private <T extends ContentFile<T>> PartitionSpec readPartitionSpec(InputFile inp private static <T extends ContentFile<T>> Map<String, String> readMetadata(InputFile inputFile) { Map<String, String> metadata; try { - try (AvroIterable<ManifestEntry<T>> headerReader = - Avro.read(inputFile) + try (CloseableIterable<ManifestEntry<T>> headerReader = + InternalData.read(FileFormat.AVRO, inputFile) .project(ManifestEntry.getSchema(Types.StructType.of()).select("status")) .classLoader(GenericManifestEntry.class.getClassLoader()) .build()) { - metadata = headerReader.getMetadata(); + + if (headerReader instanceof InternalData.DataIterable) { Review Comment: There are currently a number of things that store in kv metadata, but InternalData isn't providing a way to expose that to consumers. Right now this is limited to the [ManifestReader](https://github.com/apache/iceberg/blob/fa608705e1f7c1119eea6e0a60233a25820429ac/core/src/main/java/org/apache/iceberg/ManifestReader.java#L118), but more generally we don't have a way to access the kv data. -- 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