org.apache.pig.builtin
Class DIFF

java.lang.Object
  extended by org.apache.pig.EvalFunc<DataBag>
      extended by org.apache.pig.builtin.DIFF

public class DIFF
extends EvalFunc<DataBag>

DIFF compares the fields of a tuple with arity 2. If the fields are DataBags, it will emit any Tuples that are in on of the DataBags but not the other. If the fields are values, it will emit tuples with values that do not match.

Author:
breed

Field Summary
 
Fields inherited from class org.apache.pig.EvalFunc
returnType
 
Constructor Summary
DIFF()
           
 
Method Summary
 void exec(Tuple input, DataBag output)
          Compares a tuple with two fields.
 
Methods inherited from class org.apache.pig.EvalFunc
finish, getReturnType, isAsynchronous, outputSchema, progress
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DIFF

public DIFF()
Method Detail

exec

public void exec(Tuple input,
                 DataBag output)
          throws IOException
Compares a tuple with two fields. Emits any differences.

Specified by:
exec in class EvalFunc<DataBag>
Parameters:
input - a tuple with exactly two fields.
Throws:
IOException - if there are not exactly two fields in a tuple


Copyright © ${year} The Apache Software Foundation