|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.pig.EvalFunc<DataBag>
org.apache.pig.piggybank.evaluation.Stitch
public class Stitch
Given a set of bags, stitch them together tuple by tuple. That is, assuming the bags have row numbers join them by row number. So given two bags
{(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.
Field Summary |
---|
Fields inherited from class org.apache.pig.EvalFunc |
---|
log, pigLogger, reporter, returnType |
Constructor Summary | |
---|---|
Stitch()
|
Method Summary | |
---|---|
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. |
Methods inherited from class org.apache.pig.EvalFunc |
---|
finish, getArgToFuncMapping, getCacheFiles, getInputSchema, getLogger, getPigLogger, getReporter, getReturnType, getSchemaName, isAsynchronous, progress, setInputSchema, setPigLogger, setReporter, setUDFContextSignature, warn |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Stitch()
Method Detail |
---|
public DataBag exec(Tuple input) throws IOException
EvalFunc
exec
in class EvalFunc<DataBag>
input
- the Tuple to be processed.
IOException
public 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 input
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |