public abstract class Relation
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
boolean |
m_streamingMode
Whether the enumeration of the relation's tuples is
performed in "streaming" mode (vs.
|
| Modifier | Constructor and Description |
|---|---|
protected |
Relation()
Empty constructor.
|
| Modifier and Type | Method and Description |
|---|---|
abstract void |
accept(QueryVisitor v) |
abstract RelationIterator |
cacheIterator()
Returns an iterator over tuples of the relation
|
boolean |
contains(Tuple tup)
Determines if a relation contains a given tuple.
|
int |
getCardinality()
Computes the cardinality of a relation.
|
int |
getDegree()
A relation's degree is the size of its schema.
|
abstract Schema |
getSchema()
Returns the relation's schema
|
boolean |
isFragment()
Determines if the query tree is a fragment.
|
boolean |
isLeaf()
Determines if a given operator is at the leaf of the
query tree.
|
RelationIterator |
iterator() |
void |
setStreamingMode(boolean b)
Sets the way of querying the relation's tuples
|
abstract RelationIterator |
streamIterator()
Returns an iterator over tuples of the relation
|
java.lang.String |
toString()
Pretty-prints a relation to a string
|
abstract int |
tupleCount()
Returns the number of actual tuples present in the query.
|
public boolean m_streamingMode
protected Relation()
public abstract Schema getSchema()
public final int getDegree()
public void setStreamingMode(boolean b)
b - True to evaluate in streaming mode, false otherwisepublic final RelationIterator iterator()
public java.lang.String toString()
toString in class java.lang.Objectpublic abstract void accept(QueryVisitor v) throws QueryVisitor.VisitorException
QueryVisitor.VisitorExceptionpublic int getCardinality()
Table (which actually contain concrete tuples), calling
this method will trigger the evaluation of the query tree and
the enumeration of all tuples. It should be used sparingly.public abstract int tupleCount()
public boolean contains(Tuple tup)
contains resets any undergoing
enumeration made on the relation.tup - The tuple to look forpublic abstract RelationIterator streamIterator()
public abstract RelationIterator cacheIterator()
public boolean isFragment()
public boolean isLeaf()
Table and
VariableTable may be leaves.Copyright © Sylvain HallĂ©. All Rights Reserved.