RussellSpitzer commented on code in PR #7900:
URL: https://github.com/apache/iceberg/pull/7900#discussion_r1256347936
##########
spark/v3.4/spark/src/main/java/org/apache/iceberg/spark/SparkTableUtil.java:
##########
@@ -666,6 +667,34 @@ public static Dataset<Row> loadMetadataTable(
spark, DataSourceV2Relation.create(metadataTable, Some.empty(),
Some.empty(), options));
}
+ public static String wapBranch(SparkSession spark, String branch) {
Review Comment:
Rather than having this function do both things we should probably have two
functions.
1. Validate configuration
2. Choose branch
In general if our javadoc says a function is doing two different things, it
means that function needs to be split.
so code could look like
```java
deleteWhere() {
validateConfig
branch = branch != null ? branch : wapBranch
if (branch != null) {
deleteFiles.toBranch(branch)
}
```
--
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]