rodmeneses commented on code in PR #12639:
URL: https://github.com/apache/iceberg/pull/12639#discussion_r2038619911


##########
flink/v1.20/flink/src/main/java/org/apache/iceberg/flink/source/enumerator/ContinuousSplitPlannerImpl.java:
##########
@@ -122,6 +123,53 @@ private ContinuousEnumerationResult 
discoverIncrementalSplits(
       return new ContinuousEnumerationResult(Collections.emptyList(), 
lastPosition, lastPosition);
     } else {
       Long lastConsumedSnapshotId = lastPosition.snapshotId();
+      if (scanContext.snapshotExpirationResetStrategy() != 
SnapshotExpirationResetStrategy.DEFAULT
+          && lastConsumedSnapshotId != null
+          && !SnapshotUtil.isParentAncestorOf(
+              table, currentSnapshot.snapshotId(), lastConsumedSnapshotId)) {
+        switch (scanContext.snapshotExpirationResetStrategy()) {
+          case LATEST:
+            {
+              IcebergEnumeratorPosition newPosition =
+                  IcebergEnumeratorPosition.of(
+                      currentSnapshot.snapshotId(), 
currentSnapshot.timestampMillis());
+              LOG.info(
+                  "Snapshot expiration, last snapshot reset to latest : {}",
+                  currentSnapshot.snapshotId());
+              return new ContinuousEnumerationResult(
+                  Collections.emptyList(), lastPosition, newPosition);
+            }
+          case EARLIEST:
+          default:

Review Comment:
   will this make `DEFAULT` case to be the same as `EARLIEST` ? Is this your 
expectation ? I thought that for `DEFAULT` we shouldn't do anything 



-- 
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: issues-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to