anoopj commented on code in PR #18816:
URL: https://github.com/apache/iceberg/pull/18816#discussion_r4545383767
##########
core/src/main/java/org/apache/iceberg/V4ManifestReader.java:
##########
@@ -315,12 +377,34 @@ private TrackedFile copyResolved(TrackedFile trackedFile)
{
return copy;
}
+ private TrackedFile reclassify(TrackedFile file) {
+ TrackingStruct tracking = (TrackingStruct) file.tracking();
+ if (!tracking.isLive()) {
+ return file;
+ }
+
+ int pos = Math.toIntExact(tracking.manifestPos());
+ if (isMarkedDeleted(pos)) {
+ tracking.markDeleted(changeSnapshotId);
+ } else if (isMarkedReplaced(pos)) {
+ tracking.markReplaced(changeSnapshotId);
+ }
+
+ return file;
+ }
+
private static boolean isManifest(TrackedFile trackedFile) {
FileContent content = trackedFile.contentType();
return content == FileContent.DATA_MANIFEST || content ==
FileContent.DELETE_MANIFEST;
}
static class Builder {
+ private enum Mode {
+ DEFAULT,
+ SCAN_PLANNING,
+ CHANGES
Review Comment:
I like `CHANGELOG`, but keeping this thread open so others can share their
preference.
##########
core/src/main/java/org/apache/iceberg/V4ManifestReader.java:
##########
@@ -127,12 +144,17 @@ public CloseableIterator<TrackedFile> iterator() {
}
if (statsFilter != null) {
+ // a manifest reference holds aggregate bounds for only live files, so
we can't prune them
+ // when reading changes because a non-live entry matching the filter
could be outside
+ // those aggregate bounds
Review Comment:
Fixed.
--
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]