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

Reuben Kuhnert commented on HIVE-12540:
---------------------------------------

I just tested this, but it worked for me. Is this still an issue?

Declaration:

{code}
public class FunctionTask extends Task<FunctionWork> {
  public static class MyUDF extends UDF {

  }
}
{code}

Test:
{code}
create function udfTest as 'org.apache.hadoop.hive.ql.exec.FunctionTask$MyUDF';
INFO  : Compiling 
command(queryId=sircodesalot_20160315095656_38c72e48-856e-4ece-94e8-eecc145cc045):
 create function udfTest as 'org.apache.hadoop.hive.ql.exec.FunctionTask$MyUDF'
INFO  : Semantic Analysis Completed
INFO  : Returning Hive schema: Schema(fieldSchemas:null, properties:null)
INFO  : Completed compiling 
command(queryId=sircodesalot_20160315095656_38c72e48-856e-4ece-94e8-eecc145cc045);
 Time taken: 0.108 seconds
INFO  : Concurrency mode is disabled, not creating a lock manager
INFO  : Executing 
command(queryId=sircodesalot_20160315095656_38c72e48-856e-4ece-94e8-eecc145cc045):
 create function udfTest as 'org.apache.hadoop.hive.ql.exec.FunctionTask$MyUDF'
INFO  : Starting task [Stage-0:FUNC] in serial mode
INFO  : Completed executing 
command(queryId=sircodesalot_20160315095656_38c72e48-856e-4ece-94e8-eecc145cc045);
 Time taken: 75.289 seconds
INFO  : OK
No rows affected (75.5 seconds)
{code}

{code}
0: jdbc:hive2://localhost:10000> show functions;
show functions;
+-------------------------+--+
|        tab_name         |
+-------------------------+--+
| ...                     |
| default.udftest         |
| ...                     |
+-------------------------+--+
{code}

> Create function failed, but show functions display it
> -----------------------------------------------------
>
>                 Key: HIVE-12540
>                 URL: https://issues.apache.org/jira/browse/HIVE-12540
>             Project: Hive
>          Issue Type: Bug
>          Components: Hive
>    Affects Versions: 1.2.0, 1.2.1
>            Reporter: Weizhong
>            Priority: Minor
>
> {noformat}
> 0: jdbc:hive2://vm119:10000> create function udfTest as 
> 'hive.udf.UDFArrayNotE';
> ERROR : Failed to register default.udftest using class hive.udf.UDFArrayNotE
> Error: Error while processing statement: FAILED: Execution Error, return code 
> 1 from org.apache.hadoop.hive.ql.exec.FunctionTask (state=08S01,code=1)
> 0: jdbc:hive2://vm119:10000> show functions;
> +-------------------------+--+
> |        tab_name         |
> +-------------------------+--+
> | ...                     |
> | default.udftest         |
> | ...                     |
> +-------------------------+--+
> {noformat}



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

Reply via email to