1

How could I take many rows inside an hive-udf? I need an entire column name inside the function so that it could be added to an ArrayList inside UDF. The following is the column name:

Name
jhon
jone 
mike

I want to take all of the names in the column inside the UDF.

arghtype
  • 4,376
  • 11
  • 45
  • 60

1 Answers1

0

Looks like you are looking for aggregating function.

First, check if there is any existing aggregation functions that could suite your needs - Built-in Aggregate Functions.

If there are none, you have to create custom UDAF, which requires you to:

  • write your own evaluator and resolver (see this tutorial - Custom UDAF),
  • compile them,
  • add binaries to hive classpath,
  • register function in hive with CREATE FUNCTION (Create Function).
arghtype
  • 4,376
  • 11
  • 45
  • 60