@Override public AggregationBuffer getNewAggregationBuffer() throws HiveException { return new RankBuffer(inputOI.length, isStreamingMode); }
@Override public void iterate(AggregationBuffer agg, Object[] parameters) throws HiveException { RankBuffer rb = (RankBuffer) agg; int c = GenericUDAFRank.compare(rb.currVal, outputOI, parameters, inputOI); rb.incrRowNum(); if (rb.currentRowNum == 1 || c != 0) { nextRank(rb); rb.currVal = GenericUDAFRank.copyToStandardObject(parameters, inputOI, ObjectInspectorCopyOption.JAVA); } rb.addRank(); }
@Override public void reset(AggregationBuffer agg) throws HiveException { ((RankBuffer) agg).init(); }
RankBuffer(int numParams, boolean supportsStreaming) { this.numParams = numParams; this.supportsStreaming = supportsStreaming; init(); }
@Override public void reset(AggregationBuffer agg) throws HiveException { ((RankBuffer) agg).init(); }
@Override public AggregationBuffer getNewAggregationBuffer() throws HiveException { return new RankBuffer(inputOI.length, isStreamingMode); }
RankBuffer(int numParams, boolean supportsStreaming) { this.numParams = numParams; this.supportsStreaming = supportsStreaming; init(); }
@Override public void iterate(AggregationBuffer agg, Object[] parameters) throws HiveException { RankBuffer rb = (RankBuffer) agg; int c = GenericUDAFRank.compare(rb.currVal, outputOI, parameters, inputOI); rb.incrRowNum(); if (rb.currentRowNum == 1 || c != 0) { nextRank(rb); rb.currVal = GenericUDAFRank.copyToStandardObject(parameters, inputOI, ObjectInspectorCopyOption.JAVA); } rb.addRank(); }
@Override public void reset(AggregationBuffer agg) throws HiveException { ((RankBuffer) agg).init(); }
@Override public AggregationBuffer getNewAggregationBuffer() throws HiveException { return new RankBuffer(inputOI.length, isStreamingMode); }
RankBuffer(int numParams, boolean supportsStreaming) { this.numParams = numParams; this.supportsStreaming = supportsStreaming; init(); }
@Override public void iterate(AggregationBuffer agg, Object[] parameters) throws HiveException { RankBuffer rb = (RankBuffer) agg; int c = GenericUDAFRank.compare(rb.currVal, outputOI, parameters, inputOI); rb.incrRowNum(); if (rb.currentRowNum == 1 || c != 0) { nextRank(rb); rb.currVal = GenericUDAFRank.copyToStandardObject(parameters, inputOI, ObjectInspectorCopyOption.JAVA); } rb.addRank(); }