Advertisement
Guest User

Untitled

a guest
Jul 24th, 2019
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. add jar 'myudf.jar'
  2. CREATE temporary FUNCTION fun1 AS 'myhive.udf.hash' ;
  3. CREATE temporary FUNCTION fun2 AS 'myhive.udf.hash' ;
  4.  
  5. select fun1("abc") // right
  6. select fun2("abc",1) //error
  7.  
  8. class MyUDF extends UDF{
  9. public String evaluate(String s){
  10. return s;
  11. }
  12. public Integer evaluate(String s, int a){
  13. return s + String.valueOf(a)
  14. }
  15.  
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement