title: Overridden evaluate methods in custom hive UDF
body: <p>I am new to write custom udf for hive. I have tried writing custom udf for toupper function succecfully. </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>import org.apache.hadoop.hive.ql.exec.Description;
  import org.apache.hadoop.hive.ql.exec.UDF;
  import org.apache.hadoop.io.Text;
  
  @Description(
      name="SimpleUDFExample",
      value="returns 'hello x', where x is whatever you give it (STRING)",
      extended="SELECT simpleudfexample('world') from foo limit 1;"
      )
  class SimpleUDFExample extends UDF {
    
   public Text evaluate(Text input) {
       if(input == null) return null;
       return new Text("Hello " + input.toString());
     }
  }</code></pre>
  </div>
  </div>
  </p>
  
  <p>I have to write different implementations of evaluate based on different input parameters.</p>
  
  <p>My query is - How can i write multiple evaluate methods in a single class.Do I need to write different classes for different methods? If i write these overridden methods in a single class then How Hive is going to differ between different method which contains same type parameter. </p>
  
  <p>Please Guide me about the right way.  </p>