public OptimizerNode getSecondPredecessorNode() { if(this.input2 != null) { return this.input2.getSource(); } else { return null; } }
/** * Gets the predecessor of this node. * * @return The predecessor of this node. */ public OptimizerNode getPredecessorNode() { if (this.inConn != null) { return this.inConn.getSource(); } else { return null; } }
/** * Gets the predecessor of this node. * * @return The predecessor, or null, if no predecessor has been set. */ public OptimizerNode getPredecessorNode() { if(this.input != null) { return input.getSource(); } else { return null; } }
public OptimizerNode getFirstPredecessorNode() { if(this.input1 != null) { return this.input1.getSource(); } else { return null; } }
@Override public Iterable<OptimizerNode> getPredecessors() { List<OptimizerNode> allPredecessors = new ArrayList<OptimizerNode>(); for (DagConnection dagConnection : getIncomingConnections()) { allPredecessors.add(dagConnection.getSource()); } for (DagConnection conn : getBroadcastConnections()) { allPredecessors.add(conn.getSource()); } return allPredecessors; }
@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; } }
protected List<UnclosedBranchDescriptor> computeUnclosedBranchStackForBroadcastInputs( List<UnclosedBranchDescriptor> branchesSoFar) { // handle the data flow branching for the broadcast inputs for (DagConnection broadcastInput : getBroadcastConnections()) { OptimizerNode bcSource = broadcastInput.getSource(); addClosedBranches(bcSource.closedBranchingNodes); List<UnclosedBranchDescriptor> bcBranches = bcSource.getBranchesForParent(broadcastInput); ArrayList<UnclosedBranchDescriptor> mergedBranches = new ArrayList<UnclosedBranchDescriptor>(); mergeLists(branchesSoFar, bcBranches, mergedBranches, true); branchesSoFar = mergedBranches.isEmpty() ? Collections.<UnclosedBranchDescriptor>emptyList() : mergedBranches; } return branchesSoFar; }
@Override public void accept(Visitor<OptimizerNode> visitor) { if (visitor.preVisit(this)) { if (getPredecessorNode() != null) { getPredecessorNode().accept(visitor); } else { throw new CompilerException(); } for (DagConnection connection : getBroadcastConnections()) { connection.getSource().accept(visitor); } visitor.postVisit(this); } } }
@Override public void accept(Visitor<OptimizerNode> visitor) { if (visitor.preVisit(this)) { if (this.input1 == null || this.input2 == null) { throw new CompilerException(); } getFirstPredecessorNode().accept(visitor); getSecondPredecessorNode().accept(visitor); for (DagConnection connection : getBroadcastConnections()) { connection.getSource().accept(visitor); } visitor.postVisit(this); } } }
if (!conn.getSource().isOnDynamicPath()) { conn.setMaterializationMode(conn.getMaterializationMode().makeCached());
DagConnection broadcastConnection = broadcastConnections.get(i); String broadcastConnectionName = broadcastConnectionNames.get(i); List<PlanNode> broadcastPlanCandidates = broadcastConnection.getSource().getAlternativePlans(estimator);
DagConnection broadcastConnection = broadcastConnections.get(i); String broadcastConnectionName = broadcastConnectionNames.get(i); List<PlanNode> broadcastPlanCandidates = broadcastConnection.getSource().getAlternativePlans(estimator);
if (c.getSource() == null) { throw new CompilerException("Bug: Estimate computation called before inputs have been set.");
public OptimizerNode getSecondPredecessorNode() { if(this.input2 != null) { return this.input2.getSource(); } else { return null; } }
public OptimizerNode getFirstPredecessorNode() { if(this.input1 != null) { return this.input1.getSource(); } else { return null; } }
@Override public Iterable<OptimizerNode> getPredecessors() { List<OptimizerNode> allPredecessors = new ArrayList<OptimizerNode>(); for (DagConnection dagConnection : getIncomingConnections()) { allPredecessors.add(dagConnection.getSource()); } for (DagConnection conn : getBroadcastConnections()) { allPredecessors.add(conn.getSource()); } return allPredecessors; }
@Override public Iterable<OptimizerNode> getPredecessors() { List<OptimizerNode> allPredecessors = new ArrayList<OptimizerNode>(); for (DagConnection dagConnection : getIncomingConnections()) { allPredecessors.add(dagConnection.getSource()); } for (DagConnection conn : getBroadcastConnections()) { allPredecessors.add(conn.getSource()); } return allPredecessors; }
@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; } }