LadyForest commented on code in PR #111:
URL: https://github.com/apache/flink-table-store/pull/111#discussion_r868767106


##########
flink-table-store-connector/src/main/java/org/apache/flink/table/store/connector/source/FileStoreSource.java:
##########
@@ -122,6 +150,17 @@ public SplitEnumerator<FileStoreSourceSplit, 
PendingSplitsCheckpoint> restoreEnu
             SplitEnumeratorContext<FileStoreSourceSplit> context,
             PendingSplitsCheckpoint checkpoint) {
         FileStoreScan scan = fileStore.newScan();
+        Long snapshotId;
+        Collection<FileStoreSourceSplit> splits;
+        if (specifiedSnapshotId != null) {
+            Preconditions.checkNotNull(
+                    specifiedManifestEntries,
+                    "The manifest entries cannot be null for manual 
compaction.");

Review Comment:
   > The error message looks quite strange for me because I'm just curious : Is 
it the only case that we will set `specifiedSnapshotId` and 
`specifiedManifestEntries` for manual compaction ? Will be other case that we 
will set the two fields ?
   
   So far, only manually invoked compaction (triggered by `ALTER TABLE ... 
COMPACT`) will specify the snapshot id and manifest entries. Other conditions 
will perform a scan during the runtime.
   
   The reason is that `ALTER TABLE ... COMPACT` will pre-scan the latest 
snapshot during the planning phase, serialize the info as a string, and put it 
back to enriched options. Therefore, at the runtime, the source does not need 
to perform a scan anymore.



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