saffron.ext
Class ExtentRel
java.lang.Object
|
+--saffron.rel.Rel
|
+--saffron.ext.ExtentRel
- public class ExtentRel
- extends Rel
ExtentRel
represents all of the instances of a particular
class (including subtypes).
It cannot be implemented as such, but can often be transformed into
an expression which can. For example, in
JavaReflectConnection reflect;
select
from reflect.fields as field
join reflect.classes as clazz
on field.getDeclaringClass() == clazz &&
clazz.getPackage().getName().equals("java.lang");
the field
and clazz
are
constrained by join and filter conditions so that we can enumerate
the required fields.
todo: Why is this not just a TableAccess?
- See Also:
ExtentTable
Nested classes inherited from class saffron.rel.Rel |
|
Methods inherited from class saffron.rel.Rel |
childrenAccept, computeDigest, computeSelfCost, getChildExps, getCluster, getConvention, getCorelVariable, getEnvironment, getId, getInput, getInputs, getOrCreateCorelVariable, getParentEnv, getQualifier, getQuery, getRelTypeName, getRows, getRowType, getType, getVariablesStopped, implement, implementExp, implementExps, implementFieldAccess, implementSelf, isAccessTo, onRegister, recomputeDigest, register, registerCorelVariable, replaceInput, setCorelVariable, toString |
table
private Table table
ExtentRel
public ExtentRel(Cluster cluster,
Type rowType,
Table table)
- Creates an
ExtentRel
.
- Pre-condition:
- rowType != null, table != null
clone
public Object clone()
- Specified by:
clone
in class Rel
explain
public void explain(PlanWriter pw)
- Overrides:
explain
in class Rel
deriveRowType
protected Type deriveRowType()
- Specified by:
deriveRowType
in class Rel
isDistinct
public boolean isDistinct()
- Description copied from class:
Rel
- Returns whether the same value will not come out twice. Default value is
false
, derived classes should override.
- Overrides:
isDistinct
in class Rel
getTable
protected Table getTable()
- Description copied from class:
Rel
- If this relational expression represents an access to a table, returns
that table, otherwise returns null.
- Overrides:
getTable
in class Rel