This is an automated email from the ASF dual-hosted git repository.

lzljs3620320 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/paimon.git


The following commit(s) were added to refs/heads/master by this push:
     new 1779a4034 [test] Keep PartialUpdateITCase.testRemoveRecordOnDelete for 
non-lookup
1779a4034 is described below

commit 1779a4034c74c7a90af5eb3db603a73e7de7a536
Author: Jingsong <[email protected]>
AuthorDate: Tue Oct 29 14:04:19 2024 +0800

    [test] Keep PartialUpdateITCase.testRemoveRecordOnDelete for non-lookup
---
 .../apache/paimon/flink/PartialUpdateITCase.java   | 27 +++++++++++++++++++++-
 1 file changed, 26 insertions(+), 1 deletion(-)

diff --git 
a/paimon-flink/paimon-flink-common/src/test/java/org/apache/paimon/flink/PartialUpdateITCase.java
 
b/paimon-flink/paimon-flink-common/src/test/java/org/apache/paimon/flink/PartialUpdateITCase.java
index e0372b74d..0bedbfd02 100644
--- 
a/paimon-flink/paimon-flink-common/src/test/java/org/apache/paimon/flink/PartialUpdateITCase.java
+++ 
b/paimon-flink/paimon-flink-common/src/test/java/org/apache/paimon/flink/PartialUpdateITCase.java
@@ -623,7 +623,32 @@ public class PartialUpdateITCase extends CatalogITCaseBase 
{
     }
 
     @Test
-    public void testRemoveRecordOnDelete() throws Exception {
+    public void testRemoveRecordOnDelete() {
+        sql(
+                "CREATE TABLE remove_record_on_delete (pk INT PRIMARY KEY NOT 
ENFORCED, a STRING, b STRING) WITH ("
+                        + " 'merge-engine' = 'partial-update',"
+                        + " 'partial-update.remove-record-on-delete' = 'true'"
+                        + ")");
+
+        sql("INSERT INTO remove_record_on_delete VALUES (1, CAST (NULL AS 
STRING), 'apple')");
+
+        // delete record
+        sql("DELETE FROM remove_record_on_delete WHERE pk = 1");
+
+        // batch read
+        assertThat(sql("SELECT * FROM remove_record_on_delete")).isEmpty();
+
+        // insert records
+        sql("INSERT INTO remove_record_on_delete VALUES (1, CAST (NULL AS 
STRING), 'apache')");
+        sql("INSERT INTO remove_record_on_delete VALUES (1, 'A', CAST (NULL AS 
STRING))");
+
+        // batch read
+        assertThat(sql("SELECT * FROM remove_record_on_delete"))
+                .containsExactlyInAnyOrder(Row.of(1, "A", "apache"));
+    }
+
+    @Test
+    public void testRemoveRecordOnDeleteLookup() throws Exception {
         sql(
                 "CREATE TABLE remove_record_on_delete (pk INT PRIMARY KEY NOT 
ENFORCED, a STRING, b STRING) WITH ("
                         + " 'merge-engine' = 'partial-update',"

Reply via email to