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

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


    if(initialPlans.size()==1){
      return initialPlans.get(0);
    }
    // for two plans just return a join of both
    if(initialPlans.size()==2){
      return new InnerNodePlan(initialPlans.get(0), initialPlans.get(1));
    }

    // initialize table for dynamic programming
    @SuppressWarnings("unchecked")
    final HashMap<Long, Plan>[] bestPlans = new HashMap[initialPlans.size()];
View Full Code Here


        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){
View Full Code Here

      final BasicIndexScan index1 = getIndex((LeafNodePlan) plan, indexScan, sortCriterium, minima, maxima);
      selectivity.put(plan.getTriplePatterns().iterator().next(), plan.getSelectivity());
      root.addSucceedingOperator(new OperatorIDTuple(index1, 0));
      return index1;
    } else {
      final InnerNodePlan inp = (InnerNodePlan) plan;
      final BasicOperator left = generateOperatorGraph(inp.getLeft(), root, indexScan, inp.getJoinPartner(), minima, maxima, selectivity);
      final BasicOperator right = generateOperatorGraph(inp.getRight(), root, indexScan, inp.getJoinPartner(), minima, maxima, selectivity);
     
      return this.generateJoin(inp, root, left, right, sortCriterium, selectivity);
    }
  }
View Full Code Here

TOP

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

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.