From 8e57754d347cc15aaa99fa4a8a1fd044350cda4f Mon Sep 17 00:00:00 2001 From: YeJunHao <41894543+leaves12138@users.noreply.github.com> Date: Thu, 21 Mar 2024 17:53:38 +0800 Subject: [PATCH] [flink] Compact procedure does not process 'ALL' word (#3065) --- .../org/apache/paimon/flink/procedure/CompactProcedure.java | 2 +- .../flink/action/SortCompactActionForDynamicBucketITCase.java | 2 +- .../flink/action/SortCompactActionForUnawareBucketITCase.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/paimon-flink/paimon-flink-common/src/main/java/org/apache/paimon/flink/procedure/CompactProcedure.java b/paimon-flink/paimon-flink-common/src/main/java/org/apache/paimon/flink/procedure/CompactProcedure.java index fe354e54b7f8..ae8dfb07822b 100644 --- a/paimon-flink/paimon-flink-common/src/main/java/org/apache/paimon/flink/procedure/CompactProcedure.java +++ b/paimon-flink/paimon-flink-common/src/main/java/org/apache/paimon/flink/procedure/CompactProcedure.java @@ -112,7 +112,7 @@ public String[] call( "You must specify 'order strategy' and 'order by columns' both."); } - if (!(StringUtils.isBlank(partitions) || "ALL".equals(partitions))) { + if (!(StringUtils.isBlank(partitions))) { action.withPartitions(ParameterUtils.getPartitions(partitions.split(";"))); } diff --git a/paimon-flink/paimon-flink-common/src/test/java/org/apache/paimon/flink/action/SortCompactActionForDynamicBucketITCase.java b/paimon-flink/paimon-flink-common/src/test/java/org/apache/paimon/flink/action/SortCompactActionForDynamicBucketITCase.java index a5195c2f3bc9..3101ffb1b182 100644 --- a/paimon-flink/paimon-flink-common/src/test/java/org/apache/paimon/flink/action/SortCompactActionForDynamicBucketITCase.java +++ b/paimon-flink/paimon-flink-common/src/test/java/org/apache/paimon/flink/action/SortCompactActionForDynamicBucketITCase.java @@ -211,7 +211,7 @@ private SortCompactAction createAction(String orderStrategy, List column private void callProcedure(String orderStrategy, List orderByColumns) { callProcedure( String.format( - "CALL sys.compact('%s.%s', 'ALL', '%s', '%s')", + "CALL sys.compact('%s.%s', '', '%s', '%s')", database, tableName, orderStrategy, String.join(",", orderByColumns)), false, true); diff --git a/paimon-flink/paimon-flink-common/src/test/java/org/apache/paimon/flink/action/SortCompactActionForUnawareBucketITCase.java b/paimon-flink/paimon-flink-common/src/test/java/org/apache/paimon/flink/action/SortCompactActionForUnawareBucketITCase.java index 272b3516a3b8..24c9101a3e84 100644 --- a/paimon-flink/paimon-flink-common/src/test/java/org/apache/paimon/flink/action/SortCompactActionForUnawareBucketITCase.java +++ b/paimon-flink/paimon-flink-common/src/test/java/org/apache/paimon/flink/action/SortCompactActionForUnawareBucketITCase.java @@ -381,7 +381,7 @@ private void callProcedure( String orderStrategy, String rangeStrategy, List orderByColumns) { callProcedure( String.format( - "CALL sys.compact('%s.%s', 'ALL', '%s', '%s','sort-compaction.range-strategy=%s')", + "CALL sys.compact('%s.%s', '', '%s', '%s','sort-compaction.range-strategy=%s')", database, tableName, orderStrategy,