@Override
    public AggregationBuffer getNewAggregationBuffer() throws HiveException {
      LeadLagBuffer lb = getNewLLBuffer();
      lb.initialize(amt);
      return lb;
    }
abstract class for Lead &amp; lag UDAFs GenericUDAFLeadLag.
ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFLeadLag.java