openinx commented on code in PR #99:
URL: https://github.com/apache/flink-table-store/pull/99#discussion_r870118913
##########
flink-table-store-core/src/main/java/org/apache/flink/table/store/file/operation/FileStoreReadImpl.java:
##########
@@ -83,6 +89,34 @@ public FileStoreRead withValueProjection(int[][]
projectedFields) {
@Override
public RecordReader createReader(BinaryRowData partition, int bucket,
List<DataFileMeta> files)
throws IOException {
+ switch (writeMode) {
+ case APPEND_ONLY:
+ return createAppendOnlyReader(partition, bucket, files);
+
+ case CHANGE_LOG:
+ return createLSMReader(partition, bucket, files);
+
+ default:
+ throw new UnsupportedOperationException("Unknown write mode: "
+ writeMode);
+ }
+ }
+
+ private RecordReader createAppendOnlyReader(
+ BinaryRowData partition, int bucket, List<DataFileMeta> files)
throws IOException {
+ Preconditions.checkArgument(
+ !dropDelete, "Cannot drop delete message for append-only
table.");
Review Comment:
Oh, I see there is a `withDropDelete` method to set `dropDelete` for the
upper layer caller.
https://github.com/apache/flink-table-store/pull/99/files#diff-d148162de413a2e9954720d746159f062c0f05ec30b1bcd9bdb54161fb1d015fL65-L68
So it's good to keep this check here.
--
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]