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.Initial
EvalFunc.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, outputSchema
allowCompileTimeCalculation, finish, getCacheFiles, getInputSchema, getLoadCaster, getLogger, getPigLogger, getReporter, getReturnType, getSchemaName, getSchemaType, getShipFiles, isAsynchronous, needEndOfAllInputProcessing, progress, setEndOfAllInput, setInputSchema, setPigLogger, setReporter, setUDFContextSignature, warn
protected AlgebraicMathBase.KnownOpProvider opProvider
public List<FuncSpec> getArgToFuncMapping() throws FrontendException
EvalFunc
getArgToFuncMapping
in class EvalFunc<Double>
FrontendException
protected void setOp(AlgebraicMathBase.KNOWN_OP op)
public String getIntermed()
Algebraic
getIntermed
in interface Algebraic
Copyright © 2007-2017 The Apache Software Foundation