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

JingsongLi 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 db6e644627 Revert "[flink] Fail fast validation for delete with 
write-only mode enabled (#6153)"
db6e644627 is described below

commit db6e644627b32a1af7f5b4aa166778ce20d1d482
Author: JingsongLi <[email protected]>
AuthorDate: Sun May 24 19:21:09 2026 +0800

    Revert "[flink] Fail fast validation for delete with write-only mode 
enabled (#6153)"
    
    This reverts commit 26ba91038f9d007042aee0efaa1d07e4eb9475ee.
---
 .../apache/paimon/flink/action/DeleteAction.java   |  7 +---
 .../paimon/flink/action/DeleteActionITCase.java    | 37 ----------------------
 2 files changed, 1 insertion(+), 43 deletions(-)

diff --git 
a/paimon-flink/paimon-flink-common/src/main/java/org/apache/paimon/flink/action/DeleteAction.java
 
b/paimon-flink/paimon-flink-common/src/main/java/org/apache/paimon/flink/action/DeleteAction.java
index db63ab0edf..ed9423cf52 100644
--- 
a/paimon-flink/paimon-flink-common/src/main/java/org/apache/paimon/flink/action/DeleteAction.java
+++ 
b/paimon-flink/paimon-flink-common/src/main/java/org/apache/paimon/flink/action/DeleteAction.java
@@ -54,12 +54,7 @@ public class DeleteAction extends TableActionBase {
 
     @Override
     public void run() throws Exception {
-        CoreOptions coreOptions = CoreOptions.fromMap(table.options());
-        if (coreOptions.writeOnly()) {
-            throw new UnsupportedOperationException(
-                    "DELETE is not supported when 'write-only'='true'. Remove 
the hint or set it to false for the target table.");
-        }
-        CoreOptions.MergeEngine mergeEngine = coreOptions.mergeEngine();
+        CoreOptions.MergeEngine mergeEngine = 
CoreOptions.fromMap(table.options()).mergeEngine();
         if (mergeEngine != DEDUPLICATE) {
             throw new UnsupportedOperationException(
                     String.format(
diff --git 
a/paimon-flink/paimon-flink-common/src/test/java/org/apache/paimon/flink/action/DeleteActionITCase.java
 
b/paimon-flink/paimon-flink-common/src/test/java/org/apache/paimon/flink/action/DeleteActionITCase.java
index dbbc6104c5..02ab4fd286 100644
--- 
a/paimon-flink/paimon-flink-common/src/test/java/org/apache/paimon/flink/action/DeleteActionITCase.java
+++ 
b/paimon-flink/paimon-flink-common/src/test/java/org/apache/paimon/flink/action/DeleteActionITCase.java
@@ -44,7 +44,6 @@ import static 
org.apache.paimon.flink.util.ReadWriteTableTestUtil.init;
 import static 
org.apache.paimon.flink.util.ReadWriteTableTestUtil.testStreamingRead;
 import static 
org.apache.paimon.flink.util.ReadWriteTableTestUtil.validateStreamingReadResult;
 import static org.assertj.core.api.Assertions.assertThat;
-import static org.assertj.core.api.Assertions.assertThatThrownBy;
 
 /** IT cases for {@link DeleteAction}. */
 public class DeleteActionITCase extends ActionITCaseBase {
@@ -126,40 +125,4 @@ public class DeleteActionITCase extends ActionITCaseBase {
         assertThat(snapshot.id()).isEqualTo(1);
         
assertThat(snapshot.commitKind()).isEqualTo(Snapshot.CommitKind.APPEND);
     }
-
-    @Test
-    public void testDeleteActionWriteOnlyRejected() throws Exception {
-        Map<String, String> options = new HashMap<>();
-        options.put("write-only", "true");
-        FileStoreTable table =
-                createFileStoreTable(
-                        ROW_TYPE,
-                        Collections.emptyList(),
-                        Collections.singletonList("k"),
-                        Collections.emptyList(),
-                        options);
-        StreamWriteBuilder streamWriteBuilder =
-                table.newStreamWriteBuilder().withCommitUser(commitUser);
-        write = streamWriteBuilder.newWrite();
-        commit = streamWriteBuilder.newCommit();
-        writeData(rowData(1L, BinaryString.fromString("A")));
-        commit.commit(0, write.prepareCommit(true, 0));
-
-        DeleteAction action =
-                createAction(
-                        DeleteAction.class,
-                        "delete",
-                        "--warehouse",
-                        warehouse,
-                        "--database",
-                        database,
-                        "--table",
-                        tableName,
-                        "--where",
-                        "k=1");
-
-        assertThatThrownBy(action::run)
-                .isInstanceOf(UnsupportedOperationException.class)
-                .hasMessageContaining("write-only");
-    }
 }

Reply via email to