Function definition in hive

2013-02-22 Thread Yu PENG
Hi, I am a newbie for Hive. I was assigned a job to do a lot of queries with similar structure. I just want to ask if there is a way to define functions like other programming languages so that I can call the function with different parameters. This will be really helpful. Does anyone know that?

Re: Function definition in hive

2013-02-22 Thread Alexander Pivovarov
https://cwiki.apache.org/Hive/hiveplugins.html Creating Custom UDFs First, you need to create a new class that extends UDF, with one or more methods named evaluate. package com.example.hive.udf; import org.apache.hadoop.hive.ql.exec.UDF;import org.apache.hadoop.io.Text; public final class Lower