Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

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;
Expand All @@ -33,7 +34,7 @@
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 {
Expand Down Expand Up @@ -99,4 +100,9 @@ private void checkProperties() throws AnalysisException {
throw new AnalysisException("Unknown properties: " + properties.keySet());
}
}

@Override
protected void checkSupportedInCloudMode(ConnectContext ctx) throws DdlException {
throw new DdlException("Unsupported operation");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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");"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 """
Expand Down
Loading