dramaticlly commented on code in PR #14287:
URL: https://github.com/apache/iceberg/pull/14287#discussion_r2533020800
##########
core/src/main/java/org/apache/iceberg/RemoveSnapshots.java:
##########
@@ -167,6 +173,17 @@ public ExpireSnapshots cleanExpiredMetadata(boolean clean)
{
return this;
}
+ @Override
+ public ExpireSnapshots cleanMode(CleanupMode mode) {
+ Preconditions.checkNotNull(mode, "CleanupMode cannot be null");
+ Preconditions.checkArgument(
Review Comment:
I added this mostly want to avoid ambiguous intention when user set both
options together regardless of which option is chained first.
i.e both shall fail with exception to ask user for further clarification
```java
table.expireSnapshots()
.cleanupLevel(ExpireSnapshots.CleanupLevel.METADATA_ONLY)
.cleanExpiredFiles(false)
```
and
```java
table
.expireSnapshots()
.cleanExpiredFiles(false)
.cleanupLevel(ExpireSnapshots.CleanupLevel.METADATA_ONLY)
```
##########
core/src/main/java/org/apache/iceberg/RemoveSnapshots.java:
##########
@@ -362,9 +380,14 @@ ExpireSnapshots withIncrementalCleanup(boolean
useIncrementalCleanup) {
return this;
}
- private void cleanExpiredSnapshots() {
+ private void cleanExpiredSnapshots(CleanupLevel level) {
Review Comment:
reverted to use local state variable
--
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]