rdblue commented on code in PR #5234:
URL: https://github.com/apache/iceberg/pull/5234#discussion_r1083101029
##########
core/src/main/java/org/apache/iceberg/BaseRowDelta.java:
##########
@@ -96,23 +97,37 @@ public RowDelta validateNoConflictingDeleteFiles() {
}
@Override
- protected void validate(TableMetadata base, Snapshot snapshot) {
- if (base.currentSnapshot() != null) {
+ public RowDelta toBranch(String branch) {
+ targetBranch(branch);
+ return this;
+ }
+
+ @Override
+ protected void validate(TableMetadata base, Snapshot parent) {
+ if (parent != null) {
+ if (startingSnapshotId != null) {
+ Preconditions.checkArgument(
+ SnapshotUtil.isAncestorOf(parent.snapshotId(), startingSnapshotId,
base::snapshot),
+ "Snapshot %s is not an ancestor of %s",
Review Comment:
I think a bit more context would be helpful if you ever encounter this
error. `"Cannot validate changes: starting snapshot %s is not an ancestor of
parent snapshot %s (branch %s)"`
--
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]