wutiangan commented on a change in pull request #4502: URL: https://github.com/apache/incubator-doris/pull/4502#discussion_r481575173
########## File path: fe/fe-core/src/main/java/org/apache/doris/catalog/ResourceMgr.java ########## @@ -109,8 +112,41 @@ public int getResourceNum() { return nameToResource.size(); } - public List<List<String>> getResourcesInfo() { - return procNode.fetchResult().getRows(); + public List<List<Comparable>> getResourcesInfo(String name, boolean accurateMatch, Set<String> typeSets) { + List<List<String>> targetRows = procNode.fetchResult().getRows(); + List<List<Comparable>> returnRows = Lists.newArrayList(); + + for (List<String> row : targetRows) { + if (row == null || row.size() < 2) { + continue; + } + + String resourceName = row.get(0); + String resourceType = row.get(1); + + if (name != null) { + if (accurateMatch && !resourceName.equals(name)) { Review comment: equalsIgnore() ---------------------------------------------------------------- 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. 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