RussellSpitzer commented on code in PR #12060: URL: https://github.com/apache/iceberg/pull/12060#discussion_r1953255779
########## core/src/main/java/org/apache/iceberg/V1Metadata.java: ########## @@ -236,34 +235,38 @@ static Types.StructType dataFileSchema(Types.StructType partitionType) { } /** Wrapper used to write a ManifestEntry to v1 metadata. */ - static class IndexedManifestEntry implements ManifestEntry<DataFile>, IndexedRecord { - private final org.apache.avro.Schema avroSchema; - private final IndexedDataFile fileWrapper; + static class ManifestEntryWrapper implements ManifestEntry<DataFile>, StructLike { + private final int size; + private final DataFileWrapper fileWrapper; private ManifestEntry<DataFile> wrapped = null; - IndexedManifestEntry(Types.StructType partitionType) { - this.avroSchema = AvroSchemaUtil.convert(entrySchema(partitionType), "manifest_entry"); - this.fileWrapper = new IndexedDataFile(avroSchema.getField("data_file").schema()); + ManifestEntryWrapper() { + this.size = entrySchema(Types.StructType.of()).columns().size(); Review Comment: nit: We have an EmptyStructLike we could use here. Although maybe we should just have "of()" always return a singleton. -- 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