nastra commented on code in PR #5734:
URL: https://github.com/apache/iceberg/pull/5734#discussion_r968598297
##########
core/src/main/java/org/apache/iceberg/SnapshotParser.java:
##########
@@ -80,8 +77,8 @@ static void toJson(Snapshot snapshot, JsonGenerator
generator) throws IOExceptio
} else {
// embed the manifest list in the JSON, v1 only
generator.writeArrayFieldStart(MANIFESTS);
- for (ManifestFile file : snapshot.allManifests()) {
- generator.writeString(file.path());
+ for (String location : snapshot.v1ManifestLocations()) {
Review Comment:
the entire problem is basically that we have to provide a `FileIO` instance
(which we don't necessarily have) when calling `allManifests(io)`. In order to
initialize `allManifests` for the V1 code path of creating a Snapshot, one has
to provide a `List<ManifestFile>`, which requires a `FileIO` instance (unless
I'm missing an important piece of information). Therefore we need to have a way
to retrieve a collection of manifest locations without a dependency to
`FileIO`. Does that make sense?
--
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]