public class EmptyBagToNullFields extends ContextualEvalFunc<org.apache.pig.data.DataBag>
This can be useful when performing FLATTEN on a bag from a COGROUP, as FLATTEN on an empty bag produces no data.
| Constructor and Description |
|---|
EmptyBagToNullFields() |
| Modifier and Type | Method and Description |
|---|---|
org.apache.pig.data.DataBag |
exec(org.apache.pig.data.Tuple tuple) |
org.apache.pig.impl.logicalLayer.schema.Schema |
outputSchema(org.apache.pig.impl.logicalLayer.schema.Schema input)
Override outputSchema only to add the onSchemaReady hook method.
|
getContextProperties, getInstanceName, getInstanceProperties, onReady, setUDFContextSignatureallowCompileTimeCalculation, finish, getArgToFuncMapping, getCacheFiles, getInputSchema, getLogger, getPigLogger, getReporter, getReturnType, getSchemaName, getSchemaType, getShipFiles, isAsynchronous, progress, setInputSchema, setPigLogger, setReporter, warnpublic org.apache.pig.data.DataBag exec(org.apache.pig.data.Tuple tuple)
throws java.io.IOException
exec in class org.apache.pig.EvalFunc<org.apache.pig.data.DataBag>java.io.IOExceptionpublic org.apache.pig.impl.logicalLayer.schema.Schema outputSchema(org.apache.pig.impl.logicalLayer.schema.Schema input)
ContextualEvalFuncoutputSchema in class ContextualEvalFunc<org.apache.pig.data.DataBag>input - input schema