public class SetIntersect extends SetOperationsBase
Example:
define SetIntersect datafu.pig.sets.SetIntersect();
-- input:
-- ({(1,10),(2,20),(3,30),(4,40)},{(2,20),(4,40),(8,80)})
input = LOAD 'input' AS (B1:bag{T:tuple(val1:int,val2:int)},B2:bag{T:tuple(val1:int,val2:int)});
input = FOREACH input {
B1 = ORDER B1 BY val1 ASC, val2 ASC;
B2 = ORDER B2 BY val1 ASC, val2 ASC;
-- output:
-- ({(2,20),(4,40)})
GENERATE SetIntersect(B1,B2);
}
Constructor and Description |
---|
SetIntersect() |
Modifier and Type | Method and Description |
---|---|
boolean |
all_equal(java.util.PriorityQueue<datafu.pig.sets.SetIntersect.pair> pq) |
org.apache.pig.data.DataBag |
exec(org.apache.pig.data.Tuple input) |
outputSchema
allowCompileTimeCalculation, finish, getArgToFuncMapping, getCacheFiles, getInputSchema, getLogger, getPigLogger, getReporter, getReturnType, getSchemaName, getSchemaType, getShipFiles, isAsynchronous, progress, setInputSchema, setPigLogger, setReporter, setUDFContextSignature, warn
public boolean all_equal(java.util.PriorityQueue<datafu.pig.sets.SetIntersect.pair> pq)
public org.apache.pig.data.DataBag exec(org.apache.pig.data.Tuple input) throws java.io.IOException
exec
in class org.apache.pig.EvalFunc<org.apache.pig.data.DataBag>
java.io.IOException