|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectiterator.TupleUtils
some useful method when processing Tuple
Constructor Summary | |
TupleUtils()
|
Method Summary | |
static int |
CompareTupleWithTuple(AttrType fldType,
Tuple t1,
int t1_fld_no,
Tuple t2,
int t2_fld_no)
This function compares a tuple with another tuple in respective field, and returns: 0 if the two are equal, 1 if the tuple is greater, -1 if the tuple is smaller, |
static int |
CompareTupleWithValue(AttrType fldType,
Tuple t1,
int t1_fld_no,
Tuple value)
This function compares tuple1 with another tuple2 whose field number is same as the tuple1 |
static boolean |
Equal(Tuple t1,
Tuple t2,
AttrType[] types,
int len)
This function Compares two Tuple inn all fields |
static short[] |
setup_op_tuple(Tuple Jtuple,
AttrType[] res_attrs,
AttrType[] in1,
int len_in1,
AttrType[] in2,
int len_in2,
short[] t1_str_sizes,
short[] t2_str_sizes,
FldSpec[] proj_list,
int nOutFlds)
set up the Jtuple's attrtype, string size,field number for using join |
static short[] |
setup_op_tuple(Tuple Jtuple,
AttrType[] res_attrs,
AttrType[] in1,
int len_in1,
short[] t1_str_sizes,
FldSpec[] proj_list,
int nOutFlds)
set up the Jtuple's attrtype, string size,field number for using project |
static void |
SetValue(Tuple value,
Tuple tuple,
int fld_no,
AttrType fldType)
set up a tuple in specified field from a tuple |
static java.lang.String |
Value(Tuple tuple,
int fldno)
get the string specified by the field number |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public TupleUtils()
Method Detail |
public static int CompareTupleWithTuple(AttrType fldType, Tuple t1, int t1_fld_no, Tuple t2, int t2_fld_no) throws java.io.IOException, UnknowAttrType, TupleUtilsException
fldType
- the type of the field being compared.t1
- one tuple.t2
- another tuple.t1_fld_no
- the field numbers in the tuples to be compared.t2_fld_no
- the field numbers in the tuples to be compared.
UnknowAttrType
- don't know the attribute type
java.io.IOException
- some I/O fault
TupleUtilsException
- exception from this classpublic static int CompareTupleWithValue(AttrType fldType, Tuple t1, int t1_fld_no, Tuple value) throws java.io.IOException, UnknowAttrType, TupleUtilsException
fldType
- the type of the field being compared.t1
- one tuplevalue
- another tuple.t1_fld_no
- the field numbers in the tuples to be compared.
UnknowAttrType
- don't know the attribute type
java.io.IOException
- some I/O fault
TupleUtilsException
- exception from this classpublic static boolean Equal(Tuple t1, Tuple t2, AttrType[] types, int len) throws java.io.IOException, UnknowAttrType, TupleUtilsException
t1
- the first tuplet2
- the secocnd tuplelen
- the field numbers
UnknowAttrType
- don't know the attribute type
java.io.IOException
- some I/O fault
TupleUtilsException
- exception from this classpublic static java.lang.String Value(Tuple tuple, int fldno) throws java.io.IOException, TupleUtilsException
tuple
- the tuple
java.io.IOException
- some I/O fault
TupleUtilsException
- exception from this classpublic static void SetValue(Tuple value, Tuple tuple, int fld_no, AttrType fldType) throws java.io.IOException, UnknowAttrType, TupleUtilsException
value
- the tuple to be settuple
- the given tuplefld_no
- the field numberfldType
- the tuple attr type
UnknowAttrType
- don't know the attribute type
java.io.IOException
- some I/O fault
TupleUtilsException
- exception from this classpublic static short[] setup_op_tuple(Tuple Jtuple, AttrType[] res_attrs, AttrType[] in1, int len_in1, AttrType[] in2, int len_in2, short[] t1_str_sizes, short[] t2_str_sizes, FldSpec[] proj_list, int nOutFlds) throws java.io.IOException, TupleUtilsException
Jtuple
- reference to an actual tuple - no memory has been mallocedres_attrs
- attributes type of result tuplein1
- array of the attributes of the tuple (ok)len_in1
- num of attributes of in1in2
- array of the attributes of the tuple (ok)len_in2
- num of attributes of in2t1_str_sizes
- shows the length of the string fields in St2_str_sizes
- shows the length of the string fields in Rproj_list
- shows what input fields go where in the output tuplenOutFlds
- number of outer relation fileds
java.io.IOException
- some I/O fault
TupleUtilsException
- exception from this classpublic static short[] setup_op_tuple(Tuple Jtuple, AttrType[] res_attrs, AttrType[] in1, int len_in1, short[] t1_str_sizes, FldSpec[] proj_list, int nOutFlds) throws java.io.IOException, TupleUtilsException, InvalidRelation
Jtuple
- reference to an actual tuple - no memory has been mallocedres_attrs
- attributes type of result tuplein1
- array of the attributes of the tuple (ok)len_in1
- num of attributes of in1t1_str_sizes
- shows the length of the string fields in Sproj_list
- shows what input fields go where in the output tuplenOutFlds
- number of outer relation fileds
java.io.IOException
- some I/O fault
TupleUtilsException
- exception from this class
InvalidRelation
- invalid relation
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |