org.apache.pig.data
Interface TupleRawComparator
- All Superinterfaces:
- Comparator, org.apache.hadoop.conf.Configurable, org.apache.hadoop.io.RawComparator
- All Known Implementing Classes:
- BinInterSedes.BinInterSedesTupleRawComparator, DefaultTuple.DefaultTupleRawComparator, PigTupleDefaultRawComparator
@InterfaceAudience.Public
@InterfaceStability.Evolving
public interface TupleRawComparator
- extends org.apache.hadoop.io.RawComparator, org.apache.hadoop.conf.Configurable
This interface is intended to compare Tuples. The semantics of Tuple comparison must take into account null values in
different ways. According to SQL semantics nulls are not equal. But for other Pig/Latin statements nulls must be
grouped together. This interface allows to check if there are null fields in the tuples compared using this
comparator. This method is meaningful only when the tuples are determined to be equal by the
RawComparator.compare(byte[],int,int,byte[],int,int)
method.
Method Summary |
boolean |
hasComparedTupleNull()
Checks if one of the compared tuples had a null field. |
Methods inherited from interface org.apache.hadoop.io.RawComparator |
compare |
Methods inherited from interface org.apache.hadoop.conf.Configurable |
getConf, setConf |
hasComparedTupleNull
boolean hasComparedTupleNull()
- Checks if one of the compared tuples had a null field. This method is meaningful only when
RawComparator.compare(byte[],int,int,byte[],int,int)
has returned a zero value (i.e. tuples are determined to be
equal).
- Returns:
- true if one of the compared tuples had a null field, false otherwise.
Copyright © 2012 The Apache Software Foundation