pvary commented on code in PR #14964:
URL: https://github.com/apache/iceberg/pull/14964#discussion_r2672845302
##########
spark/v4.1/spark/src/main/java/org/apache/iceberg/spark/actions/RewriteDataFilesSparkAction.java:
##########
@@ -157,13 +158,26 @@ public RewriteDataFilesSparkAction filter(Expression
expression) {
return this;
}
+ public RewriteDataFilesSparkAction toBranch(String targetBranch) {
+ if (targetBranch != null) {
+ this.branch = targetBranch;
+ }
+ return this;
Review Comment:
Why do we do this?
It would make sense if we would define the `branch` differently, like:
```
private String branch = SnapshotRef.MAIN_BRANCH;
```
If it is just `null` then this code is just confusing. Basically equals
```
this.branch = targetBranch;
return this;
```
Just a little more confusing, because you only can not reset the value back
to `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: [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]