JingsongLi commented on code in PR #6596:
URL: https://github.com/apache/paimon/pull/6596#discussion_r2525713483


##########
paimon-flink/paimon-flink-common/src/main/java/org/apache/paimon/flink/lookup/LookupDataTableScan.java:
##########
@@ -49,29 +53,28 @@ public class LookupDataTableScan extends 
DataTableStreamScan {
 
     private static final Logger LOG = 
LoggerFactory.getLogger(LookupDataTableScan.class);
 
+    private final FileStoreTable table;
     private final StartupMode startupMode;
     private final LookupStreamScanMode lookupScanMode;
 
+    private List<BinaryRow> scanPartitions = Collections.emptyList();

Review Comment:
   default null?



##########
paimon-flink/paimon-flink-common/src/main/java/org/apache/paimon/flink/lookup/LookupDataTableScan.java:
##########
@@ -81,15 +84,45 @@ public LookupDataTableScan(
         }
     }
 
+    public void setScanPartitions(List<BinaryRow> scanPartitions) {
+        this.scanPartitions = scanPartitions;
+    }
+
     @Override
     @Nullable
     protected SnapshotReader.Plan handleOverwriteSnapshot(Snapshot snapshot) {
         SnapshotReader.Plan plan = super.handleOverwriteSnapshot(snapshot);
         if (plan != null) {
             return plan;
         }
-        LOG.info("Dim table found OVERWRITE snapshot {}, reopen.", 
snapshot.id());
-        throw new ReopenException();
+
+        if (shouldReopen(snapshot)) {
+            LOG.info("Dim table found OVERWRITE snapshot {}, reopen.", 
snapshot.id());
+            throw new ReopenException();
+        } else {
+            return null;
+        }
+    }
+
+    private boolean shouldReopen(Snapshot snapshot) {
+        if (scanPartitions.isEmpty()) {

Review Comment:
   if scan partitions is null



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

Reply via email to