RussellSpitzer commented on code in PR #4674:
URL: https://github.com/apache/iceberg/pull/4674#discussion_r870494986


##########
spark/v3.2/spark/src/main/java/org/apache/iceberg/spark/actions/BaseExpireSnapshotsSparkAction.java:
##########
@@ -147,7 +153,13 @@ public BaseExpireSnapshotsSparkAction 
deleteWith(Consumer<String> newDeleteFunc)
   public Dataset<Row> expire() {
     if (expiredFiles == null) {
       // fetch metadata before expiration
-      Dataset<Row> originalFiles = buildValidFileDF(ops.current());
+      Table staticTableBefore = newStaticTable(ops.current(), table.io());
+      allManifestsBefore = loadMetadataTable(staticTableBefore, ALL_MANIFESTS);
+      useCaching = PropertyUtil.propertyAsBoolean(options(), USE_CACHING, 
USE_CACHING_DEFAULT);
+      if (useCaching) {
+        allManifestsBefore.persist();

Review Comment:
   I think we would want to do the "memory only" cache here (and in all the 
other usages) ... but I'm not sure



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