aokolnychyi commented on a change in pull request #675: Inherit snapshot ids
for manifest entries
URL: https://github.com/apache/incubator-iceberg/pull/675#discussion_r364360582
##########
File path: core/src/main/java/org/apache/iceberg/FastAppend.java
##########
@@ -81,15 +83,21 @@ public FastAppend appendFile(DataFile file) {
@Override
public FastAppend appendManifest(ManifestFile manifest) {
- // the manifest must be rewritten with this update's snapshot ID
- try (ManifestReader reader = ManifestReader.read(
- ops.io().newInputFile(manifest.path()), ops.current().specsById())) {
- OutputFile newManifestPath =
manifestPath(manifestCount.getAndIncrement());
- appendManifests.add(ManifestWriter.copyAppendManifest(reader,
newManifestPath, snapshotId(), summaryBuilder));
+ Preconditions.checkArgument(!manifest.hasExistingFiles(), "Cannot append
manifest with existing files");
+ Preconditions.checkArgument(!manifest.hasDeletedFiles(), "Cannot append
manifest with deleted files");
+ Preconditions.checkArgument(manifest.snapshotId() == null, "Snapshot id
must be assigned during commit");
+
+ // TODO: avoid reading manifests to simply get stats
+ try (ManifestReader reader = ManifestReader.read(manifest, ops.io(),
ops.current().specsById())) {
Review comment:
Do you have a few examples of what stats you collect per partition? One of
our customers was asking about some stats about what partitions were modified,
for example.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]