[ 
https://issues.apache.org/jira/browse/TAJO-1686?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15186590#comment-15186590
 ] 

ASF GitHub Bot commented on TAJO-1686:
--------------------------------------

Github user jihoonson commented on a diff in the pull request:

    https://github.com/apache/tajo/pull/929#discussion_r55475795
  
    --- Diff: tajo-core/src/main/java/org/apache/tajo/master/TajoMaster.java ---
    @@ -215,12 +216,48 @@ public void serviceInit(Configuration conf) throws 
Exception {
         LOG.info("Tajo Master is initialized.");
       }
     
    +  private Collection<FunctionDesc> loadFunctions() throws IOException, 
AmbiguousFunctionException {
    +    List<FunctionDesc> functionList = new 
ArrayList<>(FunctionLoader.loadBuiltinFunctions().values());
    +
    +    HashMap<Integer, FunctionDesc> funcSet = new HashMap<>();
    +
    +    for (FunctionDesc desc: functionList) {
    +      funcSet.put(desc.hashCodeWithoutType(), desc);
    +    }
    +
    +    
checkUDFduplicateAndMerge(FunctionLoader.loadUserDefinedFunctions(systemConf), 
funcSet, functionList);
    +    checkUDFduplicateAndMerge(HiveFunctionLoader.loadHiveUDFs(systemConf), 
funcSet, functionList);
    +
    +    return functionList;
    +  }
    +
    +  /**
    +   * Checks duplicates between pre-loaded functions and UDFs. And they are 
meged to funcList.
    +   *
    +   * @param udfs UDF list
    +   * @param funcSet set for pre-loaded functions to match signature
    +   * @param funcList list to be merged
    +   * @throws AmbiguousFunctionException
    +   */
    +  private void checkUDFduplicateAndMerge(Optional<List<FunctionDesc>> 
udfs, HashMap<Integer, FunctionDesc> funcSet, List<FunctionDesc> funcList)
    --- End diff --
    
    It would be better if you add a test for this method.


> Allow Tajo to use Hive UDF
> --------------------------
>
>                 Key: TAJO-1686
>                 URL: https://issues.apache.org/jira/browse/TAJO-1686
>             Project: Tajo
>          Issue Type: New Feature
>          Components: Function/UDF
>            Reporter: Jaehwa Jung
>            Assignee: Jongyoung Park
>
> Hive has been widely used in this area. Many users have maintained lots of 
> big tables through Hive metastore using HiveQL and UDFs. Currently, Tajo 
> provides own UDF and Hive users can implement their UDFs in Tajo. But if we 
> can wrap Hive UDF in Tajo, it seems that they would be able to use Tajo 
> easily for their analysis infrastructure.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to