JingsongLi commented on code in PR #493:
URL: https://github.com/apache/flink-table-store/pull/493#discussion_r1095586934
##########
flink-table-store-core/src/main/java/org/apache/flink/table/store/table/source/DataSplit.java:
##########
@@ -45,26 +45,33 @@ public class DataSplit implements Split {
private List<DataFileMeta> files;
private boolean isIncremental;
+ // when reverseRowKind is true, the RowKind of records from this split
should be reversed to
+ // DELETE
+ private boolean reverseRowKind;
+
public DataSplit(
Review Comment:
Add a constructor: without `reverseRowKind`. (default false)
Other invokers can keep they as they are.
##########
flink-table-store-core/src/main/java/org/apache/flink/table/store/table/source/AbstractDataTableScan.java:
##########
@@ -126,15 +126,44 @@ public DataFilePlan plan() {
generateSplits(
snapshotId == null ? Snapshot.FIRST_SNAPSHOT_ID - 1 :
snapshotId,
scanKind != ScanKind.ALL,
+ false,
splitGenerator(pathFactory),
- plan.groupByPartFiles(plan.files(FileKind.ADD)));
+
FileStoreScan.Plan.groupByPartFiles(plan.files(FileKind.ADD)));
+ return new DataFilePlan(snapshotId, splits);
+ }
+
+ @Override
+ public DataFilePlan planOverwriteChanges() {
+ withKind(ScanKind.DELTA);
Review Comment:
We should check current snapshot is overwrite snapshot.
Add case for this.
--
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]