@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 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 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(); }