public class Stitch extends EvalFunc<DataBag>
{(1, 2), (3, 4)} and
{(5, 6), (7, 8)} the result will be
{(1, 2, 5, 6), (3, 4, 7, 8)} In general it is assumed that each bag has the same number of tuples. The implementation uses the first bag to determine the number of tuples placed in the output. If bags beyond the first have fewer tuples then the resulting tuples will have fewer fields. Nulls will not be filled in.
Any number of bags can be passed to this function.
EvalFunc.SchemaTypelog, pigLogger, reporter, returnType| Constructor and Description |
|---|
Stitch() |
| Modifier and Type | Method and Description |
|---|---|
DataBag |
exec(Tuple input)
This callback method must be implemented by all subclasses.
|
Schema |
outputSchema(Schema inputSch)
Report the schema of the output of this UDF.
|
allowCompileTimeCalculation, finish, getArgToFuncMapping, getCacheFiles, getInputSchema, getLoadCaster, getLogger, getPigLogger, getReporter, getReturnType, getSchemaName, getSchemaType, getShipFiles, isAsynchronous, needEndOfAllInputProcessing, progress, setEndOfAllInput, setInputSchema, setPigLogger, setReporter, setUDFContextSignature, warnpublic DataBag exec(Tuple input) throws IOException
EvalFuncexec in class EvalFunc<DataBag>input - the Tuple to be processed.IOExceptionpublic Schema outputSchema(Schema inputSch)
EvalFunc
The default implementation interprets the OutputSchema annotation,
if one is present. Otherwise, it returns null (no known output schema).
outputSchema in class EvalFunc<DataBag>inputSch - Schema of the inputCopyright © 2007-2017 The Apache Software Foundation