public abstract static class UDAFExampleMaxMinNUtil.Evaluator extends Object implements UDAFEvaluator
Constructor and Description |
---|
Evaluator() |
Modifier and Type | Method and Description |
---|---|
protected abstract boolean |
getAscending()
Returns true in UDAFMaxN, and false in UDAFMinN.
|
void |
init()
Reset the state.
|
boolean |
iterate(Double o,
int n)
Iterate through one row of original data.
|
boolean |
merge(UDAFExampleMaxMinNUtil.State o)
Two pointers are created to track the maximal elements in both o and MaxNArray.
|
ArrayList<Double> |
terminate()
Terminates the max N lookup and return the final result.
|
UDAFExampleMaxMinNUtil.State |
terminatePartial()
Get partial aggregation results.
|
public void init()
init
in interface UDAFEvaluator
protected abstract boolean getAscending()
public boolean iterate(Double o, int n)
public UDAFExampleMaxMinNUtil.State terminatePartial()
public boolean merge(UDAFExampleMaxMinNUtil.State o)
Copyright © 2021 The Apache Software Foundation. All rights reserved.