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

Laszlo Bodor commented on HIVE-19968:
-------------------------------------

yes, it threw the exception because of instantiation

I have to review this as the current implementation supports static methods: if 
the instantiation fails, it goes forward, and tries to find method, calls it, 
and method.invoke(obj, params) works without an instance, obj can even be null, 
it's ignored anyway.

it would be suitable to catch NoSuchMethodException separately on instantiation 
and ignore (it could be okay if the class hasn't got a default or parameterless 
constructor), but throw all other exceptions forward

> UDF exception is not throw out
> ------------------------------
>
>                 Key: HIVE-19968
>                 URL: https://issues.apache.org/jira/browse/HIVE-19968
>             Project: Hive
>          Issue Type: Bug
>            Reporter: sandflee
>            Assignee: Laszlo Bodor
>            Priority: Major
>         Attachments: HIVE-19968.01.patch, HIVE-19968.02.patch, 
> HIVE-19968.03.patch, hive-udf.png
>
>
> udf init failed, and throw a exception, but hive catch it and do nothing, 
> leading to app succ, but no data is generated.
> {code}
> GenericUDFReflect.java#evaluate()
> try {  
>    o = null;  
>    o = ReflectionUtils.newInstance(c, null);
> }   catch (Exception e) {  
> // ignored
> }
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to