danielcweeks commented on code in PR #12476:
URL: https://github.com/apache/iceberg/pull/12476#discussion_r1992243026
##########
core/src/main/java/org/apache/iceberg/AllManifestsTable.java:
##########
@@ -192,13 +191,11 @@ public List<DeleteFile> deletes() {
@Override
public CloseableIterable<StructLike> rows() {
try (CloseableIterable<ManifestFile> manifests =
- Avro.read(io.newInputFile(manifestListLocation))
- .rename("manifest_file", GenericManifestFile.class.getName())
- .rename("partitions",
GenericPartitionFieldSummary.class.getName())
- .rename("r508", GenericPartitionFieldSummary.class.getName())
+ InternalData.read(FileFormat.AVRO,
io.newInputFile(manifestListLocation))
+ .setRootType(GenericManifestFile.class)
+ .setCustomType(508, GenericPartitionFieldSummary.class)
Review Comment:
~The closes thing is probably to lookup the id from the schema:~
```
ManifestFile.SCHEMA.findField("partitions.element").fieldId()
```
~I'll use that since we don't have any static references to the field ids in
these schemas. This is clearly more readable.~
I went ahead and introduced a static reference since that's consistent with
other similar cases.
--
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]