[GitHub] [flink-table-store] JingsongLi commented on a change in pull request #40: [FLINK-26567] FileStoreSourceSplitReader should deal with value count

2022-03-09 Thread GitBox


JingsongLi commented on a change in pull request #40:
URL: https://github.com/apache/flink-table-store/pull/40#discussion_r823433452



##
File path: 
flink-table-store-connector/src/test/java/org/apache/flink/table/store/connector/source/TestDataReadWrite.java
##
@@ -75,20 +77,19 @@ public FileStoreRead createRead() {
 }
 
 public List writeFiles(
-BinaryRowData partition, int bucket, List> kvs)
-throws Exception {
+BinaryRowData partition, int bucket, List> kvs) 
throws Exception {
 Preconditions.checkNotNull(
 service, "ExecutorService must be provided if writeFiles is 
needed");
 RecordWriter writer = createMergeTreeWriter(partition, bucket);
-for (Tuple2 tuple2 : kvs) {
+for (Tuple2 tuple2 : kvs) {
 writer.write(ValueKind.ADD, GenericRowData.of(tuple2.f0), 
GenericRowData.of(tuple2.f1));
 }
 List files = writer.prepareCommit().newFiles();
 writer.close();
 return new ArrayList<>(files);
 }
 
-private RecordWriter createMergeTreeWriter(BinaryRowData partition, int 
bucket) {
+public RecordWriter createMergeTreeWriter(BinaryRowData partition, int 
bucket) {

Review comment:
   Here is not to measure the underlying `merge`, so there will be no 
duplicate key appear, and this class will be useless.




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




[GitHub] [flink-table-store] JingsongLi commented on a change in pull request #40: [FLINK-26567] FileStoreSourceSplitReader should deal with value count

2022-03-09 Thread GitBox


JingsongLi commented on a change in pull request #40:
URL: https://github.com/apache/flink-table-store/pull/40#discussion_r823432457



##
File path: 
flink-table-store-connector/src/test/java/org/apache/flink/table/store/connector/source/FileStoreSourceSplitReaderTest.java
##
@@ -64,32 +67,92 @@ public static void after() {
 }
 
 @Test
-public void testKeyAsRecord() throws Exception {
-innerTestOnce(true);
+public void testPrimaryKey() throws Exception {
+innerTestOnce(false, 0);
+}
+
+@Test
+public void testValueCount() throws Exception {
+innerTestOnce(true, 0);

Review comment:
   value is a bigint.
   - has pk, value is the record
   - value count, value is the record count




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