public class MIN extends AlgebraicByteArrayMathBase
Algebraic, so if possible the execution will
performed in a distributed fashion.
MIN can operate on any numeric type and on chararrays. It can also operate on bytearrays, which it will cast to doubles. It expects a bag of tuples of one record each. If Pig knows from the schema that this function will be passed a bag of integers or longs, it will use a specially adapted version of MIN that uses integer arithmetic for comparing the data. The return type of MIN will match the input type.
MIN implements the Accumulator interface as well.
While this will never be
the preferred method of usage it is available in case the combiner can not be
used for a given calculation.
| Modifier and Type | Class and Description |
|---|---|
protected static class |
AlgebraicMathBase.KNOWN_OP |
protected static interface |
AlgebraicMathBase.KnownOpProvider |
static class |
MIN.Final |
static class |
MIN.Intermediate |
AlgebraicByteArrayMathBase.InitialEvalFunc.SchemaType| Modifier and Type | Field and Description |
|---|---|
protected AlgebraicMathBase.KnownOpProvider |
opProvider |
log, pigLogger, reporter, returnType| Constructor and Description |
|---|
MIN() |
| Modifier and Type | Method and Description |
|---|---|
List<FuncSpec> |
getArgToFuncMapping()
Allow a UDF to specify type specific implementations of itself.
|
String |
getFinal()
Get the final function.
|
String |
getIntermed()
Get the intermediate function.
|
protected void |
setOp(AlgebraicMathBase.KNOWN_OP op) |
accumulate, cleanup, doTupleWork, exec, getInitial, getSeed, getValue, outputSchemaallowCompileTimeCalculation, finish, getCacheFiles, getInputSchema, getLoadCaster, getLogger, getPigLogger, getReporter, getReturnType, getSchemaName, getSchemaType, getShipFiles, isAsynchronous, needEndOfAllInputProcessing, progress, setEndOfAllInput, setInputSchema, setPigLogger, setReporter, setUDFContextSignature, warnprotected AlgebraicMathBase.KnownOpProvider opProvider
public List<FuncSpec> getArgToFuncMapping() throws FrontendException
EvalFuncgetArgToFuncMapping in class EvalFunc<Double>FrontendExceptionprotected void setOp(AlgebraicMathBase.KNOWN_OP op)
public String getIntermed()
AlgebraicgetIntermed in interface AlgebraicCopyright © 2007-2017 The Apache Software Foundation