You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "John Sichi (JIRA)" <ji...@apache.org> on 2010/07/10 03:48:49 UTC

[jira] Created: (HIVE-1457) improve diagnostics for incorrectly written UDAF implementations

improve diagnostics for incorrectly written UDAF implementations
----------------------------------------------------------------

                 Key: HIVE-1457
                 URL: https://issues.apache.org/jira/browse/HIVE-1457
             Project: Hadoop Hive
          Issue Type: Bug
          Components: UDF
    Affects Versions: 0.6.0
            Reporter: John Sichi
            Assignee: John Sichi
             Fix For: 0.7.0


For both reflective and generic UD(A)F, I've noticed cases where an incorrectly written Java class will cause UDF creation or execution to fail, but with poor diagnostics (e.g. NPE or non-obvious Java reflective exception), requiring the user to guess what the problem is by comparison with a working class.

Specific examples to follow; I think I have seen the following cases:

* incorrect accessibility on a class or method (e.g. private instead of public)
* missing no-arg constructor
* incorrect method return type


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HIVE-1457) improve diagnostics for incorrectly written UDAF implementations

Posted by "John Sichi (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HIVE-1457?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12887644#action_12887644 ] 

John Sichi commented on HIVE-1457:
----------------------------------

One example which came up today

----

Hi,
 I have a custom UDF which takes as an argument an array of bools.  But when I call this UDF I get this error:

FAILED: Error in semantic analysis: line 3:19 Wrong Arguments 0: No matching method for class UDFWhich with (array<boolean>). Possible choices: _FUNC_(array<boolean>)

 Which makes no sense to me since those two things look equal to me.  Here's my query:

ADD JAR /home/jonchang/projects/data/lib/udf/fb_udf.jar;
CREATE TEMPORARY FUNCTION WHICH AS 'UDFWhich';
select which(array(true, false)) from tmp_jonchang_hive_test;

Cheers,
Jonathan

> improve diagnostics for incorrectly written UDAF implementations
> ----------------------------------------------------------------
>
>                 Key: HIVE-1457
>                 URL: https://issues.apache.org/jira/browse/HIVE-1457
>             Project: Hadoop Hive
>          Issue Type: Bug
>          Components: UDF
>    Affects Versions: 0.6.0
>            Reporter: John Sichi
>            Assignee: John Sichi
>             Fix For: 0.7.0
>
>
> For both reflective and generic UD(A)F, I've noticed cases where an incorrectly written Java class will cause UDF creation or execution to fail, but with poor diagnostics (e.g. NPE or non-obvious Java reflective exception), requiring the user to guess what the problem is by comparison with a working class.
> Specific examples to follow; I think I have seen the following cases:
> * incorrect accessibility on a class or method (e.g. private instead of public)
> * missing no-arg constructor
> * incorrect method return type

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HIVE-1457) improve diagnostics for incorrectly written UDAF implementations

Posted by "John Sichi (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HIVE-1457?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12888741#action_12888741 ] 

John Sichi commented on HIVE-1457:
----------------------------------

One from Dennis

----

On Jul 13, 2010, at 2:43 PM, Dennis DeCoste wrote:

This suddenly started happening, after I just added a couple of arrays in my UDAF code and rebuilt the JAR ... the Hive query that had worked before suddenly now reports the following error.

Does this NoSuchMethodException on "J.<init>" ring any bells for anyone?  (I searched the Hive mail list and didn't see any old mentions of this ....).  I.e. what is it a symptom of?

Resolution:

Nevermind .... I had accidentally added one of my newly introduced vector declares as "long foo[];" instead of "long[] foo;" -- and it created the JAR fine.   So just a silly Java programming/typo error ...


> improve diagnostics for incorrectly written UDAF implementations
> ----------------------------------------------------------------
>
>                 Key: HIVE-1457
>                 URL: https://issues.apache.org/jira/browse/HIVE-1457
>             Project: Hadoop Hive
>          Issue Type: Bug
>          Components: UDF
>    Affects Versions: 0.6.0
>            Reporter: John Sichi
>            Assignee: John Sichi
>             Fix For: 0.7.0
>
>
> For both reflective and generic UD(A)F, I've noticed cases where an incorrectly written Java class will cause UDF creation or execution to fail, but with poor diagnostics (e.g. NPE or non-obvious Java reflective exception), requiring the user to guess what the problem is by comparison with a working class.
> Specific examples to follow; I think I have seen the following cases:
> * incorrect accessibility on a class or method (e.g. private instead of public)
> * missing no-arg constructor
> * incorrect method return type

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.