hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Clemens Valiente (JIRA)" <j...@apache.org>
Subject [jira] [Created] (HIVE-14759) GenericUDF.getFuncName breaks with UDF Classnames less than 10 characters
Date Wed, 14 Sep 2016 15:23:20 GMT
Clemens Valiente created HIVE-14759:
---------------------------------------

             Summary: GenericUDF.getFuncName breaks with UDF Classnames less than 10 characters
                 Key: HIVE-14759
                 URL: https://issues.apache.org/jira/browse/HIVE-14759
             Project: Hive
          Issue Type: Bug
          Components: UDF
    Affects Versions: 2.1.0
            Reporter: Clemens Valiente
            Assignee: Clemens Valiente
            Priority: Trivial


{code}
return getClass().getSimpleName().substring(10).toLowerCase();
{code}
causes
{code}
java.lang.StringIndexOutOfBoundsException: String index out of range: -2
    at java.lang.String.substring(String.java:1875)
    at org.apache.hadoop.hive.ql.udf.generic.GenericUDF.getFuncName(GenericUDF.java:258)
{code}

if the Classname of my UDF is less than 10 characters.
this was probably to remove "GenericUDF" from the classname but causes issues if the class
doesn't start with it.



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

Mime
View raw message