This is an automated email from the ASF dual-hosted git repository.
yiguolei pushed a commit to branch branch-4.0
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-4.0 by this push:
new 31f3d01aa7e branch-4.0: [fix](cloud) Disable
AdminSetPartitionVersionCommand in cloud mode #60263 (#60471)
31f3d01aa7e is described below
commit 31f3d01aa7ed12c238bcc86523b8565a639ab437
Author: github-actions[bot]
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Wed Feb 4 10:10:39 2026 +0800
branch-4.0: [fix](cloud) Disable AdminSetPartitionVersionCommand in cloud
mode #60263 (#60471)
Cherry-picked from #60263
Co-authored-by: meiyi <[email protected]>
---
.../trees/plans/commands/AdminSetPartitionVersionCommand.java | 8 +++++++-
.../suites/auth_call/test_database_management_auth.groovy | 2 +-
.../ddl/admin/test_nereids_admin_set_partition_version.groovy | 8 ++++++++
3 files changed, 16 insertions(+), 2 deletions(-)
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/AdminSetPartitionVersionCommand.java
b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/AdminSetPartitionVersionCommand.java
index 972894d7bf9..afc96c13ac1 100644
---
a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/AdminSetPartitionVersionCommand.java
+++
b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/AdminSetPartitionVersionCommand.java
@@ -19,6 +19,7 @@ package org.apache.doris.nereids.trees.plans.commands;
import org.apache.doris.catalog.Env;
import org.apache.doris.common.AnalysisException;
+import org.apache.doris.common.DdlException;
import org.apache.doris.common.ErrorCode;
import org.apache.doris.common.ErrorReport;
import org.apache.doris.common.util.PropertyAnalyzer;
@@ -33,7 +34,7 @@ import org.apache.doris.qe.StmtExecutor;
import java.util.Map;
/**
- * admin set partition version ("key" = "value");
+ * admin set table {table_name} partition version properties ("key" = "value");
* key and value may be : "partition_id" = "10075", "visible_version" = "100");
*/
public class AdminSetPartitionVersionCommand extends Command implements
ForwardWithSync {
@@ -99,4 +100,9 @@ public class AdminSetPartitionVersionCommand extends Command
implements ForwardW
throw new AnalysisException("Unknown properties: " +
properties.keySet());
}
}
+
+ @Override
+ protected void checkSupportedInCloudMode(ConnectContext ctx) throws
DdlException {
+ throw new DdlException("Unsupported operation");
+ }
}
diff --git
a/regression-test/suites/auth_call/test_database_management_auth.groovy
b/regression-test/suites/auth_call/test_database_management_auth.groovy
index 374b0d6349a..393321179aa 100644
--- a/regression-test/suites/auth_call/test_database_management_auth.groovy
+++ b/regression-test/suites/auth_call/test_database_management_auth.groovy
@@ -72,7 +72,7 @@ suite("test_database_management_auth","p0,auth_call") {
}
test {
sql """ADMIN SET TABLE tb PARTITION VERSION
PROPERTIES("partition_id" = "0", "visible_version" = "0");"""
- exception "denied"
+ exception "${error_in_cloud}"
}
test {
sql """admin set table tbl status properties("state" =
"NORMAL");"""
diff --git
a/regression-test/suites/nereids_p0/ddl/admin/test_nereids_admin_set_partition_version.groovy
b/regression-test/suites/nereids_p0/ddl/admin/test_nereids_admin_set_partition_version.groovy
index f00e7c4f8cb..5e90fcfb5ec 100644
---
a/regression-test/suites/nereids_p0/ddl/admin/test_nereids_admin_set_partition_version.groovy
+++
b/regression-test/suites/nereids_p0/ddl/admin/test_nereids_admin_set_partition_version.groovy
@@ -34,6 +34,14 @@ suite("test_nereids_admin_set_partition_version") {
def res = sql """show partitions from
test_nereids_admin_set_partition_version"""
def partitionId = res.get(0).get(0)
+ if (isCloudMode()) {
+ test {
+ sql "ADMIN SET TABLE test_nereids_admin_set_partition_version
PARTITION VERSION PROPERTIES('partition_id' = '${partitionId}',
'visible_version' = '100')"
+ exception "Unsupported"
+ }
+ return
+ }
+
checkNereidsExecute("ADMIN SET TABLE
test_nereids_admin_set_partition_version PARTITION VERSION
PROPERTIES('partition_id' = '${partitionId}', 'visible_version' = '100')")
sql """
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]