arina-ielchiieva commented on a change in pull request #1527: DRILL-4456: Fix Hive translate UDF URL: https://github.com/apache/drill/pull/1527#discussion_r231897328
########## File path: contrib/storage-hive/core/src/main/java/org/apache/drill/exec/expr/fn/HiveFunctionRegistry.java ########## @@ -119,10 +132,26 @@ public void register(DrillOperatorTable operatorTable) { nonDeterministicUDFs.add(clazz); } + names = renameUDF(names); + + for (String name : names) { + methods.put(name.toLowerCase(), clazz); + } + } - for(int i=0; i<names.length;i++) { - methods.put(names[i].toLowerCase(), clazz); + /** + * Checks using predicate from {@link #FUNCTION_REPLACE_MAP} + * whether specified function names should be replaced + * with the names from the map. + */ + private String[] renameUDF(String[] namesToCheck) { Review comment: Please add `@param` and `@return`. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on 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 With regards, Apache Git Services