JingsongLi commented on code in PR #99:
URL: https://github.com/apache/flink-table-store/pull/99#discussion_r865947712


##########
flink-table-store-core/src/main/java/org/apache/flink/table/store/file/operation/FileStoreReadImpl.java:
##########
@@ -81,14 +87,42 @@ public FileStoreRead withValueProjection(int[][] 
projectedFields) {
     }
 
     @Override
-    public RecordReader createReader(BinaryRowData partition, int bucket, 
List<SstFileMeta> files)
+    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.");
+
+        SstFileReader fileReader = sstFileReaderFactory.create(partition, 
bucket);

Review Comment:
   Changing very much classes can cause many conflicts, for example with 
https://github.com/apache/flink-table-store/pull/107
   Let's get this refactored as early as possible, I'm advancing it here: 
https://github.com/apache/flink-table-store/pull/108



-- 
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...@flink.apache.org

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

Reply via email to