|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsimpledb.materialize.MergeJoinScan
public class MergeJoinScan
The Scan class for the mergejoin operator.
Constructor Summary | |
---|---|
MergeJoinScan(Scan s1,
SortScan s2,
String fldname1,
String fldname2)
Creates a mergejoin scan for the two underlying sorted scans. |
Method Summary | |
---|---|
void |
beforeFirst()
Positions the scan before the first record, by positioning each underlying scan before their first records. |
void |
close()
Closes the scan by closing the two underlying scans. |
int |
getInt(String fldname)
Returns the integer value of the specified field. |
String |
getString(String fldname)
Returns the string value of the specified field. |
Constant |
getVal(String fldname)
Returns the value of the specified field. |
boolean |
hasField(String fldname)
Returns true if the specified field is in either of the underlying scans. |
boolean |
next()
Moves to the next record. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MergeJoinScan(Scan s1, SortScan s2, String fldname1, String fldname2)
s1
- the LHS sorted scans2
- the RHS sorted scanfldname1
- the LHS join fieldfldname2
- the RHS join fieldMethod Detail |
---|
public void beforeFirst()
beforeFirst
in interface Scan
Scan.beforeFirst()
public void close()
close
in interface Scan
Scan.close()
public boolean next()
If the next RHS record has the same join value, then move to it. Otherwise, if the next LHS record has the same join value, then reposition the RHS scan back to the first record having that join value. Otherwise, repeatedly move the scan having the smallest value until a common join value is found. When one of the scans runs out of records, return false.
next
in interface Scan
Scan.next()
public Constant getVal(String fldname)
getVal
in interface Scan
fldname
- the name of the field
Scan.getVal(java.lang.String)
public int getInt(String fldname)
getInt
in interface Scan
fldname
- the name of the field
Scan.getInt(java.lang.String)
public String getString(String fldname)
getString
in interface Scan
fldname
- the name of the field
Scan.getString(java.lang.String)
public boolean hasField(String fldname)
hasField
in interface Scan
fldname
- the name of the field
Scan.hasField(java.lang.String)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |