Package lupos.optimizations.physical.joinorder.costbasedoptimizer.plan

Examples of lupos.optimizations.physical.joinorder.costbasedoptimizer.plan.Plan



  @Override
  public void rearrangeJoinOrder(final Root newRoot, final BasicIndexScan indexScan) {
    final Triple<List<LeafNodePlan>, HashMap<Variable, Literal>, HashMap<Variable, Literal>> initialInfo = this.getInitialPlansAndMinimaAndMaxima(indexScan.getTriplePattern(), indexScan);
    final Plan plan = this.getPlan(initialInfo.getFirst());
    final BasicOperator op = this.operatorGraphGenerator.generateOperatorGraph(plan, newRoot, indexScan, new LinkedList<Variable>(), initialInfo.getSecond(), initialInfo.getThird(), new HashMap<TriplePattern, Map<Variable, VarBucket>>());
    op.setSucceedingOperators(indexScan.getSucceedingOperators());
  }
View Full Code Here


      // start with an initial key factor of 1
      // no plans are joined so far
      // maximum number of initial plans to join is i + 1 for this row
      this.allCombinations(1, 0, 0, 0, 0, i + 1, initialPlans, bestPlans);
    }
    final Plan result = bestPlans[initialPlans.size() - 1].get(bestPlans[initialPlans.size() - 1].keySet().iterator().next());
    result.findMaxMergeJoins();
    return result;
  }
View Full Code Here

      // Does the left and right operand have any initial plans?
      if (currentLeft + currentRight != max || currentLeft == 0 || currentRight == 0){
        return;
      }
      // find the best plans for the left and right operands of the currently considered join by looking into the table for dynamic programming
      final Plan left = bestPlans[currentLeft - 1].get(keyLeft);
      final Plan right = bestPlans[currentRight - 1].get(keyRight);
      final Plan combined = new InnerNodePlan(left.clone(), right.clone());
      this.lockBestPlan.lock();
      try {
        // do we have new best plan for joining the initial plans of the left and right operand?
        final Plan currentBest = bestPlans[max - 1].get(keyLeft + keyRight);
        if (currentBest == null || currentBest.compareTo(combined) > 0){
          bestPlans[max - 1].put(keyLeft + keyRight, combined);
        }
        return;
      } finally {
        this.lockBestPlan.unlock();
View Full Code Here

TOP

Related Classes of lupos.optimizations.physical.joinorder.costbasedoptimizer.plan.Plan

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.