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/07/31 22:17:31 UTC
[GitHub] [iceberg] rdblue commented on a diff in pull request #4926: Core, API: Performing operations on a snapshot branch ref
rdblue commented on code in PR #4926:
URL: https://github.com/apache/iceberg/pull/4926#discussion_r934046775
##########
core/src/main/java/org/apache/iceberg/SnapshotProducer.java:
##########
@@ -116,6 +117,38 @@ public ThisT scanManifestsWith(ExecutorService executorService) {
return self();
}
+ @Override
+ public ThisT toBranch(String branch) {
+ throw new UnsupportedOperationException("Performing operations on a branch is currently not supported");
Review Comment:
Minor: I think this is a good time to use `this.getClass().getName()` so that it's clear which operation doesn't support committing to a branch.
```java
throw new UnsupportedOperationException(Sting.format(
"Cannot commit to branch %s: %s does not support branch commits", branch,
this.getClass().getName());
```
##########
core/src/main/java/org/apache/iceberg/SnapshotProducer.java:
##########
@@ -116,6 +117,38 @@ public ThisT scanManifestsWith(ExecutorService executorService) {
return self();
}
+ @Override
+ public ThisT toBranch(String branch) {
+ throw new UnsupportedOperationException("Performing operations on a branch is currently not supported");
Review Comment:
Minor: I think this is a good time to use `this.getClass().getName()` so that it's clear which operation doesn't support committing to a branch.
```java
throw new UnsupportedOperationException(Sting.format(
"Cannot commit to branch %s: %s does not support branch commits",
branch,
this.getClass().getName());
```
--
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