XiaoHongbo-Hope commented on code in PR #6766:
URL: https://github.com/apache/paimon/pull/6766#discussion_r2597054632


##########
paimon-python/dev/run_mixed_tests.sh:
##########
@@ -240,6 +268,12 @@ main() {
         echo -e "${RED}✗ Java Read Test (Parquet + Lance): FAILED${NC}"
     fi
 
+     if [[ $pk_dv_result -eq 0 ]]; then

Review Comment:
   We should add pk_dv_result return value check in line 282 too



##########
paimon-core/src/test/java/org/apache/paimon/JavaPyE2ETest.java:
##########
@@ -198,6 +220,139 @@ public void testJavaWriteReadPkTable() throws Exception {
                         "6, Beef, Meat, 8.0");
     }
 
+    @Test
+    @EnabledIfSystemProperty(named = "run.e2e.tests", matches = "true")
+    public void testPKDeletionVectorWrite() throws Exception {
+        Consumer<Options> optionsSetter =
+                options -> {
+                    // let level has many files
+                    options.set(TARGET_FILE_SIZE, new MemorySize(1));
+                    options.set(DELETION_VECTORS_ENABLED, true);
+                };
+        String tableName = "test_pk_dv";
+        Path tablePath = new Path(warehouse.toString() + "/default.db/" + 
tableName);
+        FileStoreTable table = createFileStoreTable(optionsSetter, tablePath);
+        StreamTableWrite write = table.newWrite(commitUser);
+        IOManager ioManager = IOManager.create(tablePath.toString());
+        write.withIOManager(ioManager);
+        StreamTableCommit commit = table.newCommit(commitUser);
+
+        write.write(createRow3Cols(1, 10, 100L));
+        write.write(createRow3Cols(2, 20, 200L));
+        write.write(createRow3Cols(1, 11, 101L));
+        commit.commit(0, write.prepareCommit(true, 0));
+
+        write.write(createRow3Cols(1, 10, 1000L));
+        write.write(createRow3Cols(2, 21, 201L));
+        write.write(createRow3Cols(2, 21, 2001L));
+        commit.commit(1, write.prepareCommit(true, 1));
+
+        write.write(createRow3Cols(1, 11, 1001L));
+        write.write(createRow3Cols(2, 21, 20001L));
+        write.write(createRow3Cols(2, 22, 202L));
+        write.write(createRow3ColsWithKind(RowKind.DELETE, 1, 11, 1001L));
+        write.write(createRow3ColsWithKind(RowKind.DELETE, 2, 20, 200L));
+        commit.commit(2, write.prepareCommit(true, 2));
+

Review Comment:
   Can you add one more commit with DElELE to make sure position is correct in 
each commit.



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