zhangbutao commented on code in PR #4786: URL: https://github.com/apache/hive/pull/4786#discussion_r1359861042
########## standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/MetastoreDirectSqlUtils.java: ########## @@ -514,6 +514,21 @@ public void apply(SerDeInfo t, Object[] fields) { } } + static void setFunctionResourceUris(String FUNC_RU, PersistenceManager pm, String funcIds, + TreeMap<Long, Function> functions) + throws MetaException { + String queryText; + queryText = "select \"FUNC_ID\", \"RESOURCE_TYPE\", \"RESOURCE_URI\" from " + FUNC_RU + "" + + " where \"FUNC_ID\" in (" + funcIds + ")" + + " order by \"FUNC_ID\" asc, \"INTEGER_IDX\" asc"; + loopJoinOrderedResult(pm, functions, queryText, 0, new ApplyFunc<Function>() { + @Override + public void apply(Function t, Object[] fields) { + ResourceUri resourceUri = new ResourceUri(ResourceType.findByValue((int)fields[1]), (String) fields[2]); + t.getResourceUris().add(resourceUri); + }}); Review Comment: Fixed. -- 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: gitbox-unsubscr...@hive.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org For additional commands, e-mail: gitbox-h...@hive.apache.org