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 835602c5cb [hotfix] remove_orphan_files action shouldn't check table
argument (table=null means clean whole database) (#4961)
835602c5cb is described below
commit 835602c5cb691d6553fe7eb796ea8130cdf11ef3
Author: yuzelin <[email protected]>
AuthorDate: Tue Jan 21 10:21:59 2025 +0800
[hotfix] remove_orphan_files action shouldn't check table argument
(table=null means clean whole database) (#4961)
---
.../paimon/flink/action/RemoveOrphanFilesActionFactory.java | 2 +-
.../paimon/flink/action/RemoveOrphanFilesActionITCaseBase.java | 10 +++++++---
2 files changed, 8 insertions(+), 4 deletions(-)
diff --git
a/paimon-flink/paimon-flink-common/src/main/java/org/apache/paimon/flink/action/RemoveOrphanFilesActionFactory.java
b/paimon-flink/paimon-flink-common/src/main/java/org/apache/paimon/flink/action/RemoveOrphanFilesActionFactory.java
index 279bc87baf..9db1b7263a 100644
---
a/paimon-flink/paimon-flink-common/src/main/java/org/apache/paimon/flink/action/RemoveOrphanFilesActionFactory.java
+++
b/paimon-flink/paimon-flink-common/src/main/java/org/apache/paimon/flink/action/RemoveOrphanFilesActionFactory.java
@@ -38,7 +38,7 @@ public class RemoveOrphanFilesActionFactory implements
ActionFactory {
RemoveOrphanFilesAction action =
new RemoveOrphanFilesAction(
params.getRequired(DATABASE),
- params.getRequired(TABLE),
+ params.get(TABLE),
params.get(PARALLELISM),
catalogConfigMap(params));
diff --git
a/paimon-flink/paimon-flink-common/src/test/java/org/apache/paimon/flink/action/RemoveOrphanFilesActionITCaseBase.java
b/paimon-flink/paimon-flink-common/src/test/java/org/apache/paimon/flink/action/RemoveOrphanFilesActionITCaseBase.java
index 8bdb8979a2..54e211ed3b 100644
---
a/paimon-flink/paimon-flink-common/src/test/java/org/apache/paimon/flink/action/RemoveOrphanFilesActionITCaseBase.java
+++
b/paimon-flink/paimon-flink-common/src/test/java/org/apache/paimon/flink/action/RemoveOrphanFilesActionITCaseBase.java
@@ -175,9 +175,13 @@ public abstract class RemoveOrphanFilesActionITCaseBase
extends ActionITCaseBase
"--warehouse",
warehouse,
"--database",
- database,
- "--table",
- "*"));
+ database));
+
+ if (ThreadLocalRandom.current().nextBoolean()) {
+ args.add("--table");
+ args.add("*");
+ }
+
RemoveOrphanFilesAction action1 =
createAction(RemoveOrphanFilesAction.class, args);
assertThatCode(action1::run).doesNotThrowAnyException();