rdblue commented on code in PR #18984:
URL: https://github.com/apache/iceberg/pull/18984#discussion_r4580491560
##########
core/src/main/java/org/apache/iceberg/V4ManifestReader.java:
##########
@@ -61,17 +61,27 @@ class V4ManifestReader extends CloseableGroup implements
CloseableIterable<Track
static Builder builder(
ManifestFile manifest, FileIO io, Schema tableSchema, Map<Integer,
PartitionSpec> specsById) {
- return new Builder(manifest, io, tableSchema, specsById, false /*
committed */);
+ return new Builder(
+ manifest, io.newInputFile(manifest), tableSchema, specsById, false /*
committed */);
+ }
+
+ static Builder builder(
+ ManifestFile manifest,
+ InputFile file,
+ Schema tableSchema,
+ Map<Integer, PartitionSpec> specsById) {
+ return new Builder(manifest, file, tableSchema, specsById, false /*
committed */);
}
static Builder uncommitted(
ManifestFile manifest, FileIO io, Schema tableSchema, Map<Integer,
PartitionSpec> specsById) {
- return new Builder(manifest, io, tableSchema, specsById, true /*
uncommitted */);
+ return new Builder(
+ manifest, io.newInputFile(manifest), tableSchema, specsById, true /*
uncommitted */);
}
private final ManifestFile manifest;
private final ManifestBitmap dv;
- private final FileIO io;
+ private final InputFile input;
Review Comment:
Refactored the reader to accept an `InputFile` and get one from
`io.newInputFile(manifest)` in the builder factory methods. This allows tests
to pass an `InMemoryInputFile` directly rather than worrying about names
existing in `FileIO`.
--
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]