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/02/16 05:54:40 UTC

[GitHub] [iceberg] jackye1995 opened a new pull request #4138: Core: use setBranchSnapshot to commit SetSnapshotOperation

jackye1995 opened a new pull request #4138:
URL: https://github.com/apache/iceberg/pull/4138


   fixes the current build failure in master CI


-- 
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


[GitHub] [iceberg] ajantha-bhat commented on a change in pull request #4138: Core: use setBranchSnapshot to commit SetSnapshotOperation

Posted by GitBox <gi...@apache.org>.
ajantha-bhat commented on a change in pull request #4138:
URL: https://github.com/apache/iceberg/pull/4138#discussion_r807590011



##########
File path: core/src/main/java/org/apache/iceberg/SetSnapshotOperation.java
##########
@@ -113,7 +113,7 @@ public void commit() {
         .run(taskOps -> {
           Snapshot snapshot = apply();
           TableMetadata updated = TableMetadata.buildFrom(base)
-              .setCurrentSnapshot(snapshot.snapshotId())
+              .setBranchSnapshot(snapshot.snapshotId(), SnapshotRef.MAIN_BRANCH)

Review comment:
       ok. I can take up some work in this area. Will discuss offline. 




-- 
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


[GitHub] [iceberg] jackye1995 commented on a change in pull request #4138: Core: use setBranchSnapshot to commit SetSnapshotOperation

Posted by GitBox <gi...@apache.org>.
jackye1995 commented on a change in pull request #4138:
URL: https://github.com/apache/iceberg/pull/4138#discussion_r807581279



##########
File path: core/src/main/java/org/apache/iceberg/SetSnapshotOperation.java
##########
@@ -113,7 +113,7 @@ public void commit() {
         .run(taskOps -> {
           Snapshot snapshot = apply();
           TableMetadata updated = TableMetadata.buildFrom(base)
-              .setCurrentSnapshot(snapshot.snapshotId())
+              .setBranchSnapshot(snapshot.snapshotId(), SnapshotRef.MAIN_BRANCH)

Review comment:
       That feature is not added yet. We are only keeping this the same as the behavior before introducing branching. We will start to allow custom branch after adding the related methods for branching and cherry-picking.




-- 
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


[GitHub] [iceberg] ajantha-bhat commented on a change in pull request #4138: Core: use setBranchSnapshot to commit SetSnapshotOperation

Posted by GitBox <gi...@apache.org>.
ajantha-bhat commented on a change in pull request #4138:
URL: https://github.com/apache/iceberg/pull/4138#discussion_r807579901



##########
File path: core/src/main/java/org/apache/iceberg/SetSnapshotOperation.java
##########
@@ -113,7 +113,7 @@ public void commit() {
         .run(taskOps -> {
           Snapshot snapshot = apply();
           TableMetadata updated = TableMetadata.buildFrom(base)
-              .setCurrentSnapshot(snapshot.snapshotId())
+              .setBranchSnapshot(snapshot.snapshotId(), SnapshotRef.MAIN_BRANCH)

Review comment:
       Also here, we need to map to branch's snapshot ?
   
   https://github.com/apache/iceberg/blob/4790e6c68eba7023c5792d33a4ad27d3971b2202/core/src/main/java/org/apache/iceberg/SetSnapshotOperation.java#L72




-- 
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


[GitHub] [iceberg] ajantha-bhat commented on a change in pull request #4138: Core: use setBranchSnapshot to commit SetSnapshotOperation

Posted by GitBox <gi...@apache.org>.
ajantha-bhat commented on a change in pull request #4138:
URL: https://github.com/apache/iceberg/pull/4138#discussion_r807575175



##########
File path: core/src/main/java/org/apache/iceberg/SetSnapshotOperation.java
##########
@@ -113,7 +113,7 @@ public void commit() {
         .run(taskOps -> {
           Snapshot snapshot = apply();
           TableMetadata updated = TableMetadata.buildFrom(base)
-              .setCurrentSnapshot(snapshot.snapshotId())
+              .setBranchSnapshot(snapshot.snapshotId(), SnapshotRef.MAIN_BRANCH)

Review comment:
       rollback can be branch specific operation right? 
   
   As user will pass specific branch's snapshot id. We need a validation to check if the user passed snapshot is present in this branch or not ?




-- 
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


[GitHub] [iceberg] jackye1995 commented on pull request #4138: Core: use setBranchSnapshot to commit SetSnapshotOperation

Posted by GitBox <gi...@apache.org>.
jackye1995 commented on pull request #4138:
URL: https://github.com/apache/iceberg/pull/4138#issuecomment-1041157947


   Thanks for the review @ajantha-bhat ! Given this is blocking the CI I will go ahead and merge.


-- 
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


[GitHub] [iceberg] jackye1995 merged pull request #4138: Core: use setBranchSnapshot to commit SetSnapshotOperation

Posted by GitBox <gi...@apache.org>.
jackye1995 merged pull request #4138:
URL: https://github.com/apache/iceberg/pull/4138


   


-- 
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


[GitHub] [iceberg] ajantha-bhat commented on a change in pull request #4138: Core: use setBranchSnapshot to commit SetSnapshotOperation

Posted by GitBox <gi...@apache.org>.
ajantha-bhat commented on a change in pull request #4138:
URL: https://github.com/apache/iceberg/pull/4138#discussion_r807566472



##########
File path: core/src/main/java/org/apache/iceberg/SetSnapshotOperation.java
##########
@@ -113,7 +113,7 @@ public void commit() {
         .run(taskOps -> {
           Snapshot snapshot = apply();
           TableMetadata updated = TableMetadata.buildFrom(base)
-              .setCurrentSnapshot(snapshot.snapshotId())
+              .setBranchSnapshot(snapshot.snapshotId(), SnapshotRef.MAIN_BRANCH)

Review comment:
       do we need to handle the same for rollback() also ?




-- 
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


[GitHub] [iceberg] jackye1995 commented on a change in pull request #4138: Core: use setBranchSnapshot to commit SetSnapshotOperation

Posted by GitBox <gi...@apache.org>.
jackye1995 commented on a change in pull request #4138:
URL: https://github.com/apache/iceberg/pull/4138#discussion_r807570547



##########
File path: core/src/main/java/org/apache/iceberg/SetSnapshotOperation.java
##########
@@ -113,7 +113,7 @@ public void commit() {
         .run(taskOps -> {
           Snapshot snapshot = apply();
           TableMetadata updated = TableMetadata.buildFrom(base)
-              .setCurrentSnapshot(snapshot.snapshotId())
+              .setBranchSnapshot(snapshot.snapshotId(), SnapshotRef.MAIN_BRANCH)

Review comment:
       what do you mean by handle rollback? It's in this same class and committed here. The snapshot at L115 after `apply` is the one either rolled back or set by user.




-- 
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