|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectrelop.Iterator
relop.HashJoin
public class HashJoin
Implements the hash-based join algorithm described in section 14.4.3 of the textbook (3rd edition; see pages 463 to 464). HashIndex is used to partition the tuples into buckets, and HashTableDup is used to store a partition in memory during the matching phase.
Field Summary |
---|
Fields inherited from class relop.Iterator |
---|
schema |
Constructor Summary | |
---|---|
HashJoin(Iterator left,
Iterator right,
java.lang.Integer lcol,
java.lang.Integer rcol)
Constructs a hash join, given the left and right iterators and which columns to match (relative to their individual schemas). |
Method Summary | |
---|---|
void |
close()
Closes the iterator, releasing any resources (i.e. |
void |
explain(int depth)
Gives a one-line explaination of the iterator, repeats the call on any child iterators, and increases the indent depth along the way. |
Tuple |
getNext()
Gets the next tuple in the iteration. |
boolean |
hasNext()
Returns true if there are more tuples, false otherwise. |
boolean |
isOpen()
Returns true if the iterator is open; false otherwise. |
void |
restart()
Restarts the iterator, i.e. |
Methods inherited from class relop.Iterator |
---|
execute, finalize, indent |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public HashJoin(Iterator left, Iterator right, java.lang.Integer lcol, java.lang.Integer rcol)
Method Detail |
---|
public void explain(int depth)
explain
in class Iterator
public void restart()
restart
in class Iterator
public boolean isOpen()
isOpen
in class Iterator
public void close()
close
in class Iterator
public boolean hasNext()
hasNext
in class Iterator
public Tuple getNext()
getNext
in class Iterator
java.lang.IllegalStateException
- if no more tuples
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |