saffron.rel.plan
Class PlanNestedLoopJoin
java.lang.Object
|
+--saffron.rel.Rel
|
+--saffron.rel.Join
|
+--saffron.rel.plan.PlanNestedLoopJoin
- public class PlanNestedLoopJoin
- extends Join
PlanNestedLoopJoin
implements Join
using the
nested-loop algorithm, with output as a Plan
.
Nested-loops are the simplest implementation of a join: for each row
from the left hand side, get each row from the right hand side, apply
the condition, and return a joined row if the condition evaluates
true.
A join isn't a relational expression as such. The output of a join
plan is an array of all of the objects which went into it. So, for
example, the output of emp join (dept join division)
contains 3 objects.
Nested classes inherited from class saffron.rel.Rel |
|
Methods inherited from class saffron.rel.Join |
childrenAccept, deriveRowType, explain, getChildExps, getCondition, getInputs, getJoinType, getLeft, getRight, getVariablesStopped, register, registerStoppedVariable, replaceInput, setVariablesStopped, switchJoinType |
Methods inherited from class saffron.rel.Rel |
computeDigest, getCluster, getCorelVariable, getEnvironment, getId, getInput, getOrCreateCorelVariable, getParentEnv, getQualifier, getQuery, getRelTypeName, getRows, getRowType, getTable, getType, implementExp, implementExps, implementFieldAccess, implementSelf, isAccessTo, isDistinct, onRegister, recomputeDigest, registerCorelVariable, setCorelVariable, toString |
PlanNestedLoopJoin
public PlanNestedLoopJoin(Cluster cluster,
Rel left,
Rel right,
Expression condition,
int joinType,
Set variablesStopped)
clone
public Object clone()
- Overrides:
clone
in class Join
computeSelfCost
public Cost computeSelfCost(Planner planner)
- Description copied from class:
Rel
- Returns the cost of this plan (not including children). The base
implementation throws an error; derived classes should override.
- Overrides:
computeSelfCost
in class Rel
getConvention
public CallingConvention getConvention()
- Description copied from class:
Rel
- Returns a value from
CallingConvention
.
- Overrides:
getConvention
in class Rel
implement
public Object implement(Implementor implementor,
int ordinal)
- Description copied from class:
Rel
- Create a plan for this expression according to a calling convention.
- Overrides:
implement
in class Rel
- Parameters:
implementor
- implementorordinal
- indicates our position in the pre-, in- and postfix walk
over the tree; ordinal
is -1 when called from the
parent, and i
when called from the
i
th child.