RussellSpitzer commented on code in PR #15656:
URL: https://github.com/apache/iceberg/pull/15656#discussion_r2957001239
##########
core/src/main/java/org/apache/iceberg/CherryPickOperation.java:
##########
@@ -218,21 +222,49 @@ private static void validateReplacedPartitions(
parentId == null || isCurrentAncestor(meta, parentId),
"Cannot cherry-pick overwrite, based on non-ancestor of the current
state: %s",
parentId);
- try (CloseableIterable<DataFile> newFiles =
- SnapshotUtil.newFilesBetween(
- parentId, meta.currentSnapshot().snapshotId(), meta::snapshot,
io)) {
- for (DataFile newFile : newFiles) {
- ValidationException.check(
- !replacedPartitions.contains(newFile.specId(),
newFile.partition()),
- "Cannot cherry-pick replace partitions with changed partition:
%s",
- newFile.partition());
+ List<Snapshot> snapshots =
Review Comment:
I agree with you! I actually made a follow up because I'd like to address
this in SnapshotChanges #15660 and #15659 my goal is to consolidate all of this
in one place rather than having a few utility functions that all essentially do
the same thing with some minor tweaks. Let's follow up after this pr to figure
out a path forwards
--
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]