@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 GenericUDAFEvaluator getEvaluator(TypeInfo[] parameters) throws SemanticException { if (parameters.length < 1) { throw new UDFArgumentTypeException(parameters.length - 1, "One or more arguments are expected."); } for (int i = 0; i < parameters.length; i++) { ObjectInspector oi = TypeInfoUtils.getStandardJavaObjectInspectorFromTypeInfo(parameters[i]); if (!ObjectInspectorUtils.compareSupported(oi)) { throw new UDFArgumentTypeException(i, "Cannot support comparison of map<> type or complex type containing map<>."); } } return createEvaluator(); }
@Override public GenericUDAFEvaluator getEvaluator(TypeInfo[] parameters) throws SemanticException { if (parameters.length < 1) { throw new UDFArgumentTypeException(parameters.length - 1, "One or more arguments are expected."); } for (int i = 0; i < parameters.length; i++) { ObjectInspector oi = TypeInfoUtils.getStandardJavaObjectInspectorFromTypeInfo(parameters[i]); if (!ObjectInspectorUtils.compareSupported(oi)) { throw new UDFArgumentTypeException(i, "Cannot support comparison of map<> type or complex type containing map<>."); } } return createEvaluator(); }
@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 GenericUDAFEvaluator getEvaluator(TypeInfo[] parameters) throws SemanticException { if (parameters.length < 1) { throw new UDFArgumentTypeException(parameters.length - 1, "One or more arguments are expected."); } for (int i = 0; i < parameters.length; i++) { ObjectInspector oi = TypeInfoUtils.getStandardJavaObjectInspectorFromTypeInfo(parameters[i]); if (!ObjectInspectorUtils.compareSupported(oi)) { throw new UDFArgumentTypeException(i, "Cannot support comparison of map<> type or complex type containing map<>."); } } return createEvaluator(); }
@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(); }