public class ASTRangeCountOptimizer extends AbstractJoinGroupOptimizer implements IASTOptimizer
Constructor and Description |
---|
ASTRangeCountOptimizer() |
Modifier and Type | Method and Description |
---|---|
protected void |
attachRangeCounts(AST2BOpContext ctx,
List<StatementPatternNode> spNodes,
IBindingSet exogenousBindings,
int nrExogeneousBindings)
Use the
SPORelation from the database to grab the appropriate
range counts for the StatementPatternNode s. |
protected void |
estimateCardinalities(StatementPatternNode sp,
IV<?,?> s,
IV<?,?> p,
IV<?,?> o,
IV<?,?> c,
AST2BOpContext ctx,
int exogenousBindingsAdjustmentFactor) |
protected void |
estimateCardinality(StatementPatternNode sp,
AST2BOpContext ctx,
IBindingSet exogenousBindings,
int nrExogeneousBindings)
For testing purposes we can override this method.
|
protected static IV |
getIV(TermNode term,
IBindingSet exogenousBindings,
AtomicBoolean usesExogeneousBinding)
Helper method grabs the IV out of the TermNode, doing the appropriate
NULL and constant/var checks.
|
protected void |
optimizeJoinGroup(AST2BOpContext ctx,
StaticAnalysis sa,
IBindingSet[] bSets,
JoinGroupNode group)
Optimize the join group.
|
optimize
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
optimize
protected void optimizeJoinGroup(AST2BOpContext ctx, StaticAnalysis sa, IBindingSet[] bSets, JoinGroupNode group)
optimizeJoinGroup
in class AbstractJoinGroupOptimizer
protected void attachRangeCounts(AST2BOpContext ctx, List<StatementPatternNode> spNodes, IBindingSet exogenousBindings, int nrExogeneousBindings)
SPORelation
from the database to grab the appropriate
range counts for the StatementPatternNode
s. Only tries to attach
them if the annotation AST2BOpBase.Annotations.ESTIMATED_CARDINALITY
is not
already attached to the node. This makes it possible to write unit tests
without real data.protected void estimateCardinality(StatementPatternNode sp, AST2BOpContext ctx, IBindingSet exogenousBindings, int nrExogeneousBindings)
sp
- db
- exogenousBindings
- protected void estimateCardinalities(StatementPatternNode sp, IV<?,?> s, IV<?,?> p, IV<?,?> o, IV<?,?> c, AST2BOpContext ctx, int exogenousBindingsAdjustmentFactor)
protected static IV getIV(TermNode term, IBindingSet exogenousBindings, AtomicBoolean usesExogeneousBinding)
term
- exogenousBindings
- The externally given bindings (optional).Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.