|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsimpledb.materialize.MergeJoinPlan
public class MergeJoinPlan
The Plan class for the mergejoin operator.
Constructor Summary | |
---|---|
MergeJoinPlan(Plan p1,
Plan p2,
String fldname1,
String fldname2,
Transaction tx)
Creates a mergejoin plan for the two specified queries. |
Method Summary | |
---|---|
int |
blocksAccessed()
Returns the number of block acceses required to mergejoin the sorted tables. |
int |
distinctValues(String fldname)
Estimates the distinct number of field values in the join. |
Scan |
open()
The method first sorts its two underlying scans on their join field. |
int |
recordsOutput()
Returns the number of records in the join. |
Schema |
schema()
Returns the schema of the join, which is the union of the schemas of the underlying queries. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MergeJoinPlan(Plan p1, Plan p2, String fldname1, String fldname2, Transaction tx)
p1
- the LHS query planp2
- the RHS query planfldname1
- the LHS join fieldfldname2
- the RHS join fieldtx
- the calling transactionMethod Detail |
---|
public Scan open()
open
in interface Plan
Plan.open()
public int blocksAccessed()
blocksAccessed
in interface Plan
Plan.blocksAccessed()
public int recordsOutput()
R(join(p1,p2)) = R(p1)*R(p2)/max{V(p1,F1),V(p2,F2)}
recordsOutput
in interface Plan
Plan.recordsOutput()
public int distinctValues(String fldname)
distinctValues
in interface Plan
fldname
- the name of a field
Plan.distinctValues(java.lang.String)
public Schema schema()
schema
in interface Plan
Plan.schema()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |