amogh-jahagirdar commented on code in PR #18999:
URL: https://github.com/apache/iceberg/pull/18999#discussion_r4589206250
##########
spark/v4.2/spark/src/main/java/org/apache/iceberg/spark/actions/ExpireSnapshotsSparkAction.java:
##########
@@ -153,8 +155,12 @@ public ExpireSnapshotsSparkAction
cleanExpiredMetadata(boolean clean) {
*/
public Dataset<FileInfo> expireFiles() {
if (expiredFileDS == null) {
- // fetch metadata before expiration
- TableMetadata originalMetadata = ops.current();
+ TableMetadata originalMetadata = ops.refresh();
+ int formatVersion = originalMetadata.formatVersion();
+ ValidationException.check(
Review Comment:
Do we truly need to wholesale block expire snapshots for v4 table?
Technically we can still remove the non-content portion of the tree (e.g.
removing unreferenced snapshots), but we can't do the post commit file cleanup
until the metadata table dependencies are fixed up to handle v4.
Considering that what do we think about 2 separate changes:
1.) In this PR we just skip the file cleanup below with a warn log if it's a
v4 table?
2.) In a separate PR block the core expire snapshots operation if cleanup
mode is not none and it's a v4 table?
--
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]