danielcweeks commented on code in PR #12476:
URL: https://github.com/apache/iceberg/pull/12476#discussion_r2006139375
##########
core/src/main/java/org/apache/iceberg/ManifestReader.java:
##########
@@ -133,12 +132,17 @@ 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 AvroIterable) {
Review Comment:
We can hunt down the metadata usage separately from this PR, but this
preserves existing behavior while transitioning to the new InternalData read
path.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]