dramaticlly commented on code in PR #14287:
URL: https://github.com/apache/iceberg/pull/14287#discussion_r2449172909
##########
core/src/main/java/org/apache/iceberg/RemoveSnapshots.java:
##########
@@ -103,7 +104,12 @@ class RemoveSnapshots implements ExpireSnapshots {
@Override
public ExpireSnapshots cleanExpiredFiles(boolean clean) {
- this.cleanExpiredFiles = clean;
+ LOG.warn("cleanExpiredFiles(boolean) is deprecated. Use
cleanMode(CleanupMode) instead.");
+ Preconditions.checkArgument(
Review Comment:
Thanks Eduard, I added such validation mainly want to prevent double
intention where one set both the cleanExpired files as well as cleanupMode, so
intention is not clear and override might be risky, this could lead to some
unexpected results so throw early maybe helpful.
This can be found more in my unit test named
`testCannotSetCleanExpiredFilesAndCleanModeTogether` in
https://github.com/apache/iceberg/pull/14287/files?new_files_changed=true#diff-35ed4072da58b6d638da909476780a4da8d97390bd56e41f8555b15b91499b64R2071-R2091.
--
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]