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


##########
fe/fe-core/src/main/java/org/apache/doris/analysis/AlterRoutineLoadStmt.java:
##########
@@ -248,9 +253,21 @@ private void checkJobProperties() throws UserException {
         }
         if (jobProperties.containsKey(CreateRoutineLoadStmt.WORKLOAD_GROUP)) {
             String workloadGroup = 
jobProperties.get(CreateRoutineLoadStmt.WORKLOAD_GROUP);
-            long wgId = Env.getCurrentEnv().getWorkloadGroupMgr()
-                    
.getWorkloadGroup(ConnectContext.get().getCurrentUserIdentity(), workloadGroup);
-            analyzedJobProperties.put(CreateRoutineLoadStmt.WORKLOAD_GROUP, 
String.valueOf(wgId));
+            if (!StringUtils.isEmpty(workloadGroup)) {
+                ConnectContext tmpCtx = new ConnectContext();
+                
tmpCtx.setCurrentUserIdentity(ConnectContext.get().getCurrentUserIdentity());
+                tmpCtx.getSessionVariable().setWorkloadGroup(workloadGroup);
+                long wgId;
+                try {
+                    wgId = Env.getCurrentEnv().getWorkloadGroupMgr()
+                            .getWorkloadGroup(tmpCtx).get(0)

Review Comment:
   这个get 方法为什么返回的是一个list?



-- 
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