public class SUBTRACT
- extends EvalFunc<DataBag>
SUBTRACT takes two bags as arguments and returns a new bag composed of tuples of first bag not in the second bag.
If null, bag arguments are replaced by empty bags.
The implementation assumes that both bags being passed to this function will fit entirely into memory simultaneously.
If that is not the case the UDF will still function, but it will be very slow.
Compares the two bag fields from input Tuple and returns a new bag composed of elements of first bag not in the second bag.
|Methods inherited from class org.apache.pig.EvalFunc
finish, getArgToFuncMapping, getCacheFiles, getInputSchema, getLogger, getPigLogger, getReporter, getReturnType, getSchemaName, isAsynchronous, outputSchema, progress, setInputSchema, setPigLogger, setReporter, setUDFContextSignature, warn
|Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public DataBag exec(Tuple input)
- Compares the two bag fields from input Tuple and returns a new bag composed of elements of first bag not in the second bag.
- Specified by:
exec in class
input - a tuple with exactly two bag fields.
- result, of type T.
IOException - if there are not exactly two fields in a tuple or if they are not
Copyright © 2007-2012 The Apache Software Foundation