In this section, we introduce the UDAF code template, which extends from the org.apache.hadoop.hive.ql.exec.UDAF class. The code template is as follows:
package com.packtpub.hive.essentials.hiveudaf; import org.apache.hadoop.hive.ql.exec.UDAF; import org.apache.hadoop.hive.ql.exec.UDAFEvaluator; import org.apache.hadoop.hive.ql.exec.Description; import org.apache.hadoop.hive.ql.udf.UDFType; @Description( name = "udaf_name", value = "_FUNC_(arg1, arg2, ... argN) - description for the function", extended = "description with more details, such as syntax, examples." ) @UDFType(deterministic = false, stateful = true) public final class udaf_name extends UDAF { /** * The internal state of an aggregation function. * * Note that ...