|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--saffron.rel.Rel
|
+--saffron.rel.TableAccess
A TableAccess reads all the rows from a Table.
If the table is a JdbcTable, then this is literally
possible. But for other kinds of tables, there may be many ways to read the
data from the table. For some kinds of table, it may not even be possible to
read all of the rows unless some narrowing constraint is applied. In the
example of the ReflectSchema schema,
cannot be implemented, butselect from fields
select from fields as f
where f.getClass().getName().equals("java.lang.String")
can. It is the optimizer's responsibility to find these ways,
by applying transformation rules.
| Nested Class Summary | |
private static class |
TableAccess.ConvertToJavaRule
Rule to converts a TableAccess to
Java calling convention. |
| Nested classes inherited from class saffron.rel.Rel |
|
| Field Summary | |
protected Expression |
connectionExp
The expression which yields the connection object. |
protected Table |
table
|
| Fields inherited from class saffron.rel.Rel |
cluster, digest, emptyArray, id, nextId, rowType |
| Constructor Summary | |
TableAccess(Cluster cluster,
Table table,
Expression connectionExp)
|
|
| Method Summary | |
Object |
clone()
|
Cost |
computeSelfCost(Planner planner)
Returns the cost of this plan (not including children). |
Type |
deriveRowType()
|
void |
explain(PlanWriter pw)
|
Expression[] |
getChildExps()
Returns an array of this Rel's child expressions (not
including the inputs returned by Rel.getInputs(). |
Expression |
getConnectionExp()
|
double |
getRows()
Returns an estimate of the number of rows this relational expression will return. |
Table |
getTable()
If this relational expression represents an access to a table, returns that table, otherwise returns null. |
static void |
register(Planner planner)
See Rel.register(saffron.Planner). |
| Methods inherited from class saffron.rel.Rel |
childrenAccept, computeDigest, getCluster, getConvention, getCorelVariable, getEnvironment, getId, getInput, getInputs, getOrCreateCorelVariable, getParentEnv, getQualifier, getQuery, getRelTypeName, getRowType, getType, getVariablesStopped, implement, implementExp, implementExps, implementFieldAccess, implementSelf, isAccessTo, isDistinct, onRegister, recomputeDigest, registerCorelVariable, replaceInput, setCorelVariable, toString |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected Table table
protected Expression connectionExp
| Constructor Detail |
public TableAccess(Cluster cluster,
Table table,
Expression connectionExp)
| Method Detail |
public Expression getConnectionExp()
public Object clone()
clone in class Relpublic double getRows()
Rel
getRows in class Relpublic Expression[] getChildExps()
RelRel's child expressions (not
including the inputs returned by Rel.getInputs(). If there are no
child expressions, returns an empty array, not null.
getChildExps in class Relpublic void explain(PlanWriter pw)
explain in class Relpublic static void register(Planner planner)
Rel.register(saffron.Planner).
public Cost computeSelfCost(Planner planner)
Rel
computeSelfCost in class Relpublic Type deriveRowType()
deriveRowType in class Relpublic Table getTable()
Rel
getTable in class Rel
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||