public class AppendToBag extends SimpleEvalFunc<org.apache.pig.data.DataBag>
Example:
define AppendToBag datafu.pig.bags.AppendToBag();
-- input:
-- ({(1),(2),(3)},(4))
-- ({(10),(20),(30),(40),(50)},(60))
input = LOAD 'input' AS (B: bag{T: tuple(v:INT)}, T: tuple(v:INT));
-- output:
-- ({(1),(2),(3),(4)})
-- ({(10),(20),(30),(40),(50),(60)})
output = FOREACH input GENERATE AppendToBag(B,T) as B;
Constructor and Description |
---|
AppendToBag() |
Modifier and Type | Method and Description |
---|---|
org.apache.pig.data.DataBag |
call(org.apache.pig.data.DataBag inputBag,
org.apache.pig.data.Tuple t) |
org.apache.pig.impl.logicalLayer.schema.Schema |
outputSchema(org.apache.pig.impl.logicalLayer.schema.Schema input)
Override outputSchema so we can verify the input schema at pig compile time, instead of runtime
|
exec, getReturnType
allowCompileTimeCalculation, finish, getArgToFuncMapping, getCacheFiles, getInputSchema, getLogger, getPigLogger, getReporter, getSchemaName, getSchemaType, getShipFiles, isAsynchronous, progress, setInputSchema, setPigLogger, setReporter, setUDFContextSignature, warn
public org.apache.pig.data.DataBag call(org.apache.pig.data.DataBag inputBag, org.apache.pig.data.Tuple t) throws java.io.IOException
java.io.IOException
public org.apache.pig.impl.logicalLayer.schema.Schema outputSchema(org.apache.pig.impl.logicalLayer.schema.Schema input)
SimpleEvalFunc
outputSchema
in class SimpleEvalFunc<org.apache.pig.data.DataBag>
input
- input schema