@Override public void clearInterestingProperties() { super.clearInterestingProperties(); this.singleRoot.accept(InterestingPropertiesClearer.INSTANCE); this.rootConnection.clearInterestingProperties(); }
public GroupReduceNode getCombinerUtilityNode() { if (this.combinerUtilityNode == null) { this.combinerUtilityNode = new GroupReduceNode(this); // we conservatively assume the combiner returns the same data size as it consumes this.combinerUtilityNode.estimatedOutputSize = getPredecessorNode().getEstimatedOutputSize(); this.combinerUtilityNode.estimatedNumRecords = getPredecessorNode().getEstimatedNumRecords(); } return this.combinerUtilityNode; } }
public ReduceNode getCombinerUtilityNode() { if (this.preReduceUtilityNode == null) { this.preReduceUtilityNode = new ReduceNode(this); // we conservatively assume the combiner returns the same data size as it consumes this.preReduceUtilityNode.estimatedOutputSize = getPredecessorNode().getEstimatedOutputSize(); this.preReduceUtilityNode.estimatedNumRecords = getPredecessorNode().getEstimatedNumRecords(); } return this.preReduceUtilityNode; } }
@Override public void computeUnclosedBranchStack() { if (this.openBranches != null) { return; } DagConnection worksetInput = this.iterationNode.getSecondIncomingConnection(); OptimizerNode worksetSource = worksetInput.getSource(); addClosedBranches(worksetSource.closedBranchingNodes); List<UnclosedBranchDescriptor> fromInput = worksetSource.getBranchesForParent(worksetInput); this.openBranches = (fromInput == null || fromInput.isEmpty()) ? Collections.<UnclosedBranchDescriptor>emptyList() : fromInput; } }
@Override public void computeUnclosedBranchStack() { if (this.openBranches != null) { return; } DagConnection solutionSetInput = this.iterationNode.getFirstIncomingConnection(); OptimizerNode solutionSetSource = solutionSetInput.getSource(); addClosedBranches(solutionSetSource.closedBranchingNodes); List<UnclosedBranchDescriptor> fromInput = solutionSetSource.getBranchesForParent(solutionSetInput); this.openBranches = (fromInput == null || fromInput.isEmpty()) ? Collections.<UnclosedBranchDescriptor>emptyList() : fromInput; } }
@Override protected void computeOperatorSpecificDefaultEstimates(DataStatistics statistics) { long card1 = getFirstPredecessorNode().getEstimatedNumRecords(); long card2 = getSecondPredecessorNode().getEstimatedNumRecords(); this.estimatedNumRecords = (card1 < 0 || card2 < 0) ? -1 : card1 + card2; long size1 = getFirstPredecessorNode().getEstimatedOutputSize(); long size2 = getSecondPredecessorNode().getEstimatedOutputSize(); this.estimatedOutputSize = (size1 < 0 || size2 < 0) ? -1 : size1 + size2; }
@Override public void computeUnclosedBranchStack() { if (this.openBranches != null) { return; } // we need to track open branches even in the sinks, because they get "closed" when // we build a single "root" for the data flow plan addClosedBranches(getPredecessorNode().closedBranchingNodes); this.openBranches = getPredecessorNode().getBranchesForParent(this.input); }
@Override public void clearInterestingProperties() { super.clearInterestingProperties(); this.nextWorksetRootConnection.clearInterestingProperties(); this.solutionSetDeltaRootConnection.clearInterestingProperties(); this.nextWorkset.accept(InterestingPropertiesClearer.INSTANCE); this.solutionSetDelta.accept(InterestingPropertiesClearer.INSTANCE); }
/** * Computes the estimated outputs for the data sink. Since the sink does not modify anything, it simply * copies the output estimates from its direct predecessor. */ @Override protected void computeOperatorSpecificDefaultEstimates(DataStatistics statistics) { this.estimatedNumRecords = getPredecessorNode().getEstimatedNumRecords(); this.estimatedOutputSize = getPredecessorNode().getEstimatedOutputSize(); }
@Override protected void computeOperatorSpecificDefaultEstimates(DataStatistics statistics) { this.estimatedOutputSize = getPredecessorNode().getEstimatedOutputSize(); this.estimatedNumRecords = getPredecessorNode().getEstimatedNumRecords(); }
@Override protected void computeOperatorSpecificDefaultEstimates(DataStatistics statistics) { this.estimatedOutputSize = getFirstPredecessorNode().getEstimatedOutputSize(); this.estimatedNumRecords = getFirstPredecessorNode().getEstimatedNumRecords(); }
public void clearInterestingProperties() { this.intProps = null; for (DagConnection conn : getIncomingConnections()) { conn.clearInterestingProperties(); } for (DagConnection conn : getBroadcastConnections()) { conn.clearInterestingProperties(); } }
@Override protected void computeOperatorSpecificDefaultEstimates(DataStatistics statistics) { this.estimatedNumRecords = getPredecessorNode().getEstimatedNumRecords(); this.estimatedOutputSize = getPredecessorNode().getEstimatedOutputSize(); } }
@Override protected void computeOperatorSpecificDefaultEstimates(DataStatistics statistics) { // sorting does not change the number of records this.estimatedNumRecords = getPredecessorNode().getEstimatedNumRecords(); this.estimatedOutputSize = getPredecessorNode().getEstimatedOutputSize(); }
/** * Computes the estimates for the Filter operator. Since it applies a filter on the data we assume a cardinality * decrease. To give the system a hint at data decrease, we use a default magic number to indicate a 0.5 decrease. */ @Override protected void computeOperatorSpecificDefaultEstimates(DataStatistics statistics) { this.estimatedNumRecords = (long) (getPredecessorNode().getEstimatedNumRecords() * 0.5); this.estimatedOutputSize = (long) (getPredecessorNode().getEstimatedOutputSize() * 0.5); } }
@Override protected void computeOperatorSpecificDefaultEstimates(DataStatistics statistics) { // partitioning does not change the number of records this.estimatedNumRecords = getPredecessorNode().getEstimatedNumRecords(); this.estimatedOutputSize = getPredecessorNode().getEstimatedOutputSize(); }
/** * Computes the estimates for the Map operator. * We assume that by default, Map takes one value and transforms it into another value. * The cardinality consequently stays the same. */ @Override protected void computeOperatorSpecificDefaultEstimates(DataStatistics statistics) { this.estimatedNumRecords = getPredecessorNode().getEstimatedNumRecords(); } }
/** * Computes the estimates for the FlatMap operator. Since it un-nests, we assume a cardinality * increase. To give the system a hint at data increase, we take a default magic number of a 5 times increase. */ @Override protected void computeOperatorSpecificDefaultEstimates(DataStatistics statistics) { this.estimatedNumRecords = getPredecessorNode().getEstimatedNumRecords() * 5; } }
@Override public void postVisit(OptimizerNode node) { if (node instanceof IterationNode) { ((IterationNode) node).acceptForStepFunction(this); } node.computeUnclosedBranchStack(); } }
@Override public void computeOutputEstimates(DataStatistics statistics) { copyEstimates(this.iterationNode.getInitialWorksetPredecessorNode()); }