public class DefaultEvaluationPlan2 extends Object implements IEvaluationPlan
| Modifier and Type | Field and Description |
|---|---|
protected static boolean |
DEBUG |
protected static boolean |
INFO |
protected static org.apache.log4j.Logger |
log |
| Constructor and Description |
|---|
DefaultEvaluationPlan2(IJoinNexus joinNexus,
IRule rule)
Computes an evaluation plan for the rule.
|
DefaultEvaluationPlan2(IRangeCountFactory rangeCountFactory,
IRule rule)
Computes an evaluation plan for the rule.
|
| Modifier and Type | Method and Description |
|---|---|
long |
cardinality(int tailIndex)
Return the cardinality of a particular tail, which is the range count
if not optional and infinite if optional.
|
protected long |
computeJoinCardinality(com.bigdata.bop.joinGraph.fast.DefaultEvaluationPlan2.IJoinDimension d1,
com.bigdata.bop.joinGraph.fast.DefaultEvaluationPlan2.IJoinDimension d2)
This is the secret sauce.
|
int[] |
getOrder()
Return the evaluation order.
|
protected Set<String> |
getVars(int tail)
Get the named variables for a given tail.
|
protected boolean |
hasSharedVars(com.bigdata.bop.joinGraph.fast.DefaultEvaluationPlan2.IJoinDimension d1,
com.bigdata.bop.joinGraph.fast.DefaultEvaluationPlan2.IJoinDimension d2)
Look for shared variables.
|
protected boolean |
hasUnsharedVars(com.bigdata.bop.joinGraph.fast.DefaultEvaluationPlan2.IJoinDimension d1,
com.bigdata.bop.joinGraph.fast.DefaultEvaluationPlan2.IJoinDimension d2)
Look for unshared variables.
|
boolean |
isEmpty()
true iff the IRule was proven to be empty based on
range counts or other data. |
long |
rangeCount(int tailIndex)
Return the range count for the predicate, ignoring any bindings.
|
String |
toString() |
protected static final transient org.apache.log4j.Logger log
protected static final transient boolean DEBUG
protected static final transient boolean INFO
public DefaultEvaluationPlan2(IJoinNexus joinNexus, IRule rule)
joinNexus - The join nexus.rule - The rule.public DefaultEvaluationPlan2(IRangeCountFactory rangeCountFactory, IRule rule)
rangeCountFactory - The range count factory.rule - The rule.public int[] getOrder()
IEvaluationPlangetOrder in interface IEvaluationPlan[2,0,1] says that the predicates will
be evaluated in the order tail[2], then tail[0], then tail[1].public boolean isEmpty()
IEvaluationPlantrue iff the IRule was proven to be empty based on
range counts or other data.isEmpty in interface IEvaluationPlanpublic long rangeCount(int tailIndex)
rangeCount in interface IEvaluationPlantailIndex - The index of the predicate in the tail of the rule.IRangeCountFactorypublic long cardinality(int tailIndex)
protected long computeJoinCardinality(com.bigdata.bop.joinGraph.fast.DefaultEvaluationPlan2.IJoinDimension d1,
com.bigdata.bop.joinGraph.fast.DefaultEvaluationPlan2.IJoinDimension d2)
Any join involving an optional will have infinite cardinality, so that optionals get placed at the end.
d1 - the first join dimensiond2 - the second join dimensionprotected Set<String> getVars(int tail)
tail - the tailprotected boolean hasSharedVars(com.bigdata.bop.joinGraph.fast.DefaultEvaluationPlan2.IJoinDimension d1,
com.bigdata.bop.joinGraph.fast.DefaultEvaluationPlan2.IJoinDimension d2)
d1 - the first join dimensiond2 - the second join dimensionprotected boolean hasUnsharedVars(com.bigdata.bop.joinGraph.fast.DefaultEvaluationPlan2.IJoinDimension d1,
com.bigdata.bop.joinGraph.fast.DefaultEvaluationPlan2.IJoinDimension d2)
d1 - the first join dimensiond2 - the second join dimensionCopyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.