yiguolei commented on code in PR #48187: URL: https://github.com/apache/doris/pull/48187#discussion_r1968685785
########## fe/fe-core/src/main/java/org/apache/doris/qe/ConnectContext.java: ########## @@ -1266,6 +1275,52 @@ public CloudClusterResult getCloudClusterByPolicy() { : new CloudClusterResult(hasAuthCluster.get(0), CloudClusterResult.Comment.FOUND_BY_FRIST_CLUSTER_HAS_AUTH); } + public ComputeGroup getComputeGroupWithRuntimeException() { + try { + return getComputeGroup(); + } catch (UserException e) { + throw new RuntimeException(e); + } + } + + public ComputeGroup getComputeGroup() throws UserException { + ComputeGroupMgr cgMgr = Env.getCurrentEnv().getComputeGroupMgr(); + if (Config.isCloudMode()) { + return cgMgr.getComputeGroup(getCurrentCloudCluster()); + } else { + String currentUser = getQualifiedUser(); + boolean isUserEmpty = StringUtils.isEmpty(currentUser); + String computeGroupName = null; + if (!isUserEmpty) { + computeGroupName = Env.getCurrentEnv().getAuth().getDefaultCloudCluster(currentUser); + } + if (!StringUtils.isEmpty(computeGroupName)) { + return cgMgr.getComputeGroupByStringNames(computeGroupName); + } else { + Set<Tag> rgTags = getResourceTags(); Review Comment: 把这种函数名都换了 -- 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: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org