You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2022/06/21 17:25:50 UTC
[GitHub] [iceberg] namrathamyske commented on a diff in pull request #5010: Core, API: Append/Delete changes to branch Impl
namrathamyske commented on code in PR #5010:
URL: https://github.com/apache/iceberg/pull/5010#discussion_r902882044
##########
core/src/main/java/org/apache/iceberg/SnapshotProducer.java:
##########
@@ -167,8 +182,10 @@ protected void validate(TableMetadata currentMetadata) {
@Override
public Snapshot apply() {
refresh();
- Long parentSnapshotId = base.currentSnapshot() != null ?
- base.currentSnapshot().snapshotId() : null;
+ Long parentSnapshotId = base.currentSnapshot() != null ? base.currentSnapshot().snapshotId() : null;
+ if(toBranch != null){
+ parentSnapshotId = base.ref(toBranch).snapshotId();
+ }
Review Comment:
if we set target branch as Main, we can just do
`Long parentSnapshotId = base.ref(targetBranch) != null ? base.ref(targetBranch).snapshotId() : null;`
--
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: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org