yiguolei commented on code in PR #63505:
URL: https://github.com/apache/doris/pull/63505#discussion_r3295766773


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/AlterWorkloadGroupCommand.java:
##########
@@ -82,21 +82,21 @@ public void doRun(ConnectContext ctx, StmtExecutor 
executor) throws Exception {
             throw new AnalysisException(WorkloadGroup.COMPUTE_GROUP + " can 
not be set in property.");
         }
 
-        ComputeGroup cg = null;
+        ComputeGroup cg;
         if (Config.isCloudMode()) {
             if (StringUtils.isEmpty(computeGroup)) {
-                computeGroup = Tag.VALUE_DEFAULT_COMPUTE_GROUP_NAME;
+                throw new UserException("Must specify compute group via 'FOR 
<compute_group>' "
+                        + "in cloud mode.");
             }
-            String cgName = computeGroup;
-            cg = 
Env.getCurrentEnv().getComputeGroupMgr().getComputeGroupByName(cgName);
+            cg = 
Env.getCurrentEnv().getComputeGroupMgr().getComputeGroupByName(computeGroup);
             if (cg == null) {
-                throw new UserException("Can not find compute group:" + 
cgName);
+                throw new UserException("Can not find compute group:" + 
computeGroup);
             }
         } else {
-            if (StringUtils.isEmpty(computeGroup)) {
-                computeGroup = Tag.DEFAULT_BACKEND_TAG.value;
+            if (!StringUtils.isEmpty(computeGroup)) {

Review Comment:
   这个修复不对
   我们再非cloud mode 下,也是支持for 来指定的。
   只是不指定的时候,默认就是Tag.DEFAULT_BACKEND_TAG.value;



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to