org.apache.pig
Class ComparisonFunc

java.lang.Object
  extended by org.apache.hadoop.io.WritableComparator
      extended by org.apache.pig.ComparisonFunc
All Implemented Interfaces:
Comparator, org.apache.hadoop.io.RawComparator

public abstract class ComparisonFunc
extends org.apache.hadoop.io.WritableComparator


Constructor Summary
ComparisonFunc()
           
 
Method Summary
abstract  int compare(Tuple t1, Tuple t2)
          This callback method must be implemented by all subclasses.
 int compare(org.apache.hadoop.io.WritableComparable a, org.apache.hadoop.io.WritableComparable b)
           
 
Methods inherited from class org.apache.hadoop.io.WritableComparator
compare, compare, compareBytes, define, get, getKeyClass, hashBytes, newKey, readDouble, readFloat, readInt, readLong, readUnsignedShort, readVInt, readVLong
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Comparator
equals
 

Constructor Detail

ComparisonFunc

public ComparisonFunc()
Method Detail

compare

public int compare(org.apache.hadoop.io.WritableComparable a,
                   org.apache.hadoop.io.WritableComparable b)
Overrides:
compare in class org.apache.hadoop.io.WritableComparator

compare

public abstract int compare(Tuple t1,
                            Tuple t2)
This callback method must be implemented by all subclasses. Compares its two arguments for order. Returns a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second. The order of elements of the tuples correspond to the fields specified in the order by clause. Same semantics as Comparator.

Parameters:
t1 - the first Tuple to be compared.
t2 - the second Tuple to be compared.
Throws:
IOException
See Also:
Comparator


Copyright © ${year} The Apache Software Foundation