iterator
Class FileScan
java.lang.Object
iterator.Iterator
iterator.FileScan
- All Implemented Interfaces:
- Flags
- public class FileScan
- extends Iterator
open a heapfile and according to the condition expression to get
output file, call get_next to get all tuples
|
Constructor Summary |
FileScan(java.lang.String file_name,
AttrType[] in1,
short[] s1_sizes,
short len_in1,
int n_out_flds,
FldSpec[] proj_list,
CondExpr[] outFilter)
constructor |
|
Method Summary |
void |
close()
implement the abstract method close() from super class Iterator
to finish cleaning up |
Tuple |
get_next()
abstract method, every subclass must implement it. |
FldSpec[] |
show()
|
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
perm_mat
public FldSpec[] perm_mat
FileScan
public FileScan(java.lang.String file_name,
AttrType[] in1,
short[] s1_sizes,
short len_in1,
int n_out_flds,
FldSpec[] proj_list,
CondExpr[] outFilter)
throws java.io.IOException,
FileScanException,
TupleUtilsException,
InvalidRelation
- constructor
- Parameters:
file_name - heapfile to be openedlen_in1 - number of attributes in the input tuplen_out_flds - number of fields in the out tupleproj_list - shows what input fields go where in the output tupleoutFilter - select expressions
- Throws:
java.io.IOException - some I/O fault
FileScanException - exception from this class
TupleUtilsException - exception from this class
InvalidRelation - invalid relation
show
public FldSpec[] show()
- Returns:
- shows what input fields go where in the output tuple
get_next
public Tuple get_next()
throws JoinsException,
java.io.IOException,
InvalidTupleSizeException,
InvalidTypeException,
PageNotReadException,
PredEvalException,
UnknowAttrType,
FieldNumberOutOfBoundException,
WrongPermat
- Description copied from class:
Iterator
- abstract method, every subclass must implement it.
- Specified by:
get_next in class Iterator
- Returns:
- the result tuple
- Throws:
JoinsException - some join exception
java.io.IOException - I/O errors
InvalidTupleSizeException - invalid tuple size
InvalidTypeException - tuple type not valid
PageNotReadException - exception from lower layer
PredEvalException - exception from PredEval class
UnknowAttrType - attribute type unknown
FieldNumberOutOfBoundException - array out of bounds
WrongPermat - exception for wrong FldSpec argument
close
public void close()
- implement the abstract method close() from super class Iterator
to finish cleaning up
- Specified by:
close in class Iterator