amogh-jahagirdar commented on code in PR #19012:
URL: https://github.com/apache/iceberg/pull/19012#discussion_r4604499790


##########
spark/v4.2/spark/src/main/java/org/apache/iceberg/spark/actions/ExpireSnapshotsSparkAction.java:
##########
@@ -156,11 +154,10 @@ public ExpireSnapshotsSparkAction 
cleanExpiredMetadata(boolean clean) {
   public Dataset<FileInfo> expireFiles() {
     if (expiredFileDS == null) {
       TableMetadata originalMetadata = ops.refresh();
-      int formatVersion = originalMetadata.formatVersion();
       ValidationException.check(
-          formatVersion <= LAST_SUPPORTED_FORMAT_VERSION,
-          "Cannot expire snapshots: this action does not support v%s tables",
-          formatVersion);
+          originalMetadata.snapshots().stream()
+              .noneMatch(snapshot -> snapshot.rootManifestLocation() != null),

Review Comment:
   I don't think there's a good place to keep the shared helper as it would 
have to be public to share across modules and then we'd throw it away later and 
it's a fairly simple processing over snapshots



-- 
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]

Reply via email to