org.openrdf.query.algebra.evaluation.impl
Class QueryJoinOptimizer.JoinVisitor

java.lang.Object
  extended by org.openrdf.query.algebra.helpers.QueryModelVisitorBase<RuntimeException>
      extended by org.openrdf.query.algebra.evaluation.impl.QueryJoinOptimizer.JoinVisitor
All Implemented Interfaces:
QueryModelVisitor<RuntimeException>
Enclosing class:
QueryJoinOptimizer

protected class QueryJoinOptimizer.JoinVisitor
extends QueryModelVisitorBase<RuntimeException>


Constructor Summary
protected QueryJoinOptimizer.JoinVisitor()
           
 
Method Summary
protected  void getJoinArgs(TupleExpr tupleExpr, List<TupleExpr> joinArgs)
           
 void meet(Join node)
           
protected  TupleExpr selectNextTupleExpr(List<TupleExpr> expressions, Set<String> boundVars)
          Selects from a list of tuple expressions the next tuple expression that should be evaluated.
protected  List<TupleExpr> sortExpressions(List<TupleExpr> expressions, Set<String> boundVars)
          Merges the boolean constraints and the path expressions in one single list.
 
Methods inherited from class org.openrdf.query.algebra.helpers.QueryModelVisitorBase
meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meetBinaryTupleOperator, meetBinaryValueOperator, meetCompareSubQueryValueOperator, meetNode, meetOther, meetSubQueryValueOperator, meetUnaryTupleOperator, meetUnaryValueOperator
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QueryJoinOptimizer.JoinVisitor

protected QueryJoinOptimizer.JoinVisitor()
Method Detail

meet

public void meet(Join node)
Specified by:
meet in interface QueryModelVisitor<RuntimeException>
Overrides:
meet in class QueryModelVisitorBase<RuntimeException>

getJoinArgs

protected void getJoinArgs(TupleExpr tupleExpr,
                           List<TupleExpr> joinArgs)

sortExpressions

protected List<TupleExpr> sortExpressions(List<TupleExpr> expressions,
                                          Set<String> boundVars)
Merges the boolean constraints and the path expressions in one single list. Path expressions are heuristically reordered to minimize query evaluation time and boolean constraints are inserted between them. The separate boolean constraints are moved to the start of the list as much as possible, under the condition that all variables that are used in the constraint are instantiated by the path expressions that are earlier in the list. An example combined list might be: [(A,B,C), A != foo:bar, (B,E,F), C != F, (F,G,H)].


selectNextTupleExpr

protected TupleExpr selectNextTupleExpr(List<TupleExpr> expressions,
                                        Set<String> boundVars)
Selects from a list of tuple expressions the next tuple expression that should be evaluated. This method selects the tuple expression with highest number of bound variables, preferring variables that have been bound in other tuple expressions over variables with a fixed value.



Copyright © 2001-2008 Aduna. All Rights Reserved.