@Override public void computeOutputEstimates(DataStatistics statistics) { OptimizerNode in1 = getFirstPredecessorNode(); OptimizerNode in2 = getSecondPredecessorNode(); this.estimatedNumRecords = in1.estimatedNumRecords > 0 && in2.estimatedNumRecords > 0 ? in1.estimatedNumRecords + in2.estimatedNumRecords : -1; this.estimatedOutputSize = in1.estimatedOutputSize > 0 && in2.estimatedOutputSize > 0 ? in1.estimatedOutputSize + in2.estimatedOutputSize : -1; }
@Override public void computeUnionOfInterestingPropertiesFromSuccessors() { super.computeUnionOfInterestingPropertiesFromSuccessors(); // clear all local properties, as they are destroyed anyways getInterestingProperties().getLocalProperties().clear(); }
@Override public void addOutgoingConnection(DagConnection connection) { // ensure that union nodes have not more than one outgoing connection. if (this.getOutgoingConnections() != null && this.getOutgoingConnections().size() > 0) { throw new CompilerException("BinaryUnionNode may only have a single outgoing connection."); } super.addOutgoingConnection(connection); }
if (this.getOutgoingConnections().size() > 1) { throw new CompilerException("BinaryUnionNode has more than one successor."); final List<? extends PlanNode> subPlans1 = getFirstPredecessorNode().getAlternativePlans(estimator); final List<? extends PlanNode> subPlans2 = getSecondPredecessorNode().getAlternativePlans(estimator); List<DagConnection> broadcastConnections = getBroadcastConnections(); if (broadcastConnections != null && broadcastConnections.size() > 0) { throw new CompilerException("Found BroadcastVariables on a Union operation"); final ExecutionMode input2Mode = this.input2.getDataExchangeMode(); final int parallelism = getParallelism(); final int inParallelism1 = getFirstPredecessorNode().getParallelism(); final int inParallelism2 = getSecondPredecessorNode().getParallelism(); if (!areBranchCompatible(child1, child2)) { continue; instantiate(operator, c1, c2, broadcastPlanChannels, outputPlans, estimator, igps, igps, noLocalProps, noLocalProps); estimator.costOperator(node); prunePlanAlternatives(outputPlans); outputPlans.trimToSize();
n = new BinaryUnionNode((Union<?>) c);
if (this.getOutgoingConnections().size() > 1) { throw new CompilerException("BinaryUnionNode has more than one successor."); final List<? extends PlanNode> subPlans1 = getFirstPredecessorNode().getAlternativePlans(estimator); final List<? extends PlanNode> subPlans2 = getSecondPredecessorNode().getAlternativePlans(estimator); List<DagConnection> broadcastConnections = getBroadcastConnections(); if (broadcastConnections != null && broadcastConnections.size() > 0) { throw new CompilerException("Found BroadcastVariables on a Union operation"); final ExecutionMode input2Mode = this.input2.getDataExchangeMode(); final int parallelism = getParallelism(); final int inParallelism1 = getFirstPredecessorNode().getParallelism(); final int inParallelism2 = getSecondPredecessorNode().getParallelism(); if (!areBranchCompatible(child1, child2)) { continue; instantiate(operator, c1, c2, broadcastPlanChannels, outputPlans, estimator, igps, igps, noLocalProps, noLocalProps); estimator.costOperator(node); prunePlanAlternatives(outputPlans); outputPlans.trimToSize();
n = new BinaryUnionNode((Union<?>) c);
if (this.getOutgoingConnections().size() > 1) { throw new CompilerException("BinaryUnionNode has more than one successor."); final List<? extends PlanNode> subPlans1 = getFirstPredecessorNode().getAlternativePlans(estimator); final List<? extends PlanNode> subPlans2 = getSecondPredecessorNode().getAlternativePlans(estimator); List<DagConnection> broadcastConnections = getBroadcastConnections(); if (broadcastConnections != null && broadcastConnections.size() > 0) { throw new CompilerException("Found BroadcastVariables on a Union operation"); final ExecutionMode input2Mode = this.input2.getDataExchangeMode(); final int parallelism = getParallelism(); final int inParallelism1 = getFirstPredecessorNode().getParallelism(); final int inParallelism2 = getSecondPredecessorNode().getParallelism(); if (!areBranchCompatible(child1, child2)) { continue; instantiate(operator, c1, c2, broadcastPlanChannels, outputPlans, estimator, igps, igps, noLocalProps, noLocalProps); estimator.costOperator(node); prunePlanAlternatives(outputPlans); outputPlans.trimToSize();
@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 computeInterestingPropertiesForInputs(CostEstimator estimator) { final InterestingProperties props = getInterestingProperties(); // if no other properties exist, add the pruned trivials back if (props.getGlobalProperties().isEmpty()) { props.addGlobalProperties(new RequestedGlobalProperties()); } props.addLocalProperties(new RequestedLocalProperties()); this.input1.setInterestingProperties(props.clone()); this.input2.setInterestingProperties(props.clone()); this.channelProps = props.getGlobalProperties(); }
n = new BinaryUnionNode((Union<?>) c);
@Override public void addOutgoingConnection(DagConnection connection) { // ensure that union nodes have not more than one outgoing connection. if (this.getOutgoingConnections() != null && this.getOutgoingConnections().size() > 0) { throw new CompilerException("BinaryUnionNode may only have a single outgoing connection."); } super.addOutgoingConnection(connection); }
if (this.getOutgoingConnections().size() > 1) { throw new CompilerException("BinaryUnionNode has more than one successor."); final List<? extends PlanNode> subPlans1 = getFirstPredecessorNode().getAlternativePlans(estimator); final List<? extends PlanNode> subPlans2 = getSecondPredecessorNode().getAlternativePlans(estimator); List<DagConnection> broadcastConnections = getBroadcastConnections(); if (broadcastConnections != null && broadcastConnections.size() > 0) { throw new CompilerException("Found BroadcastVariables on a Union operation"); final ExecutionMode input2Mode = this.input2.getDataExchangeMode(); final int parallelism = getParallelism(); final int inParallelism1 = getFirstPredecessorNode().getParallelism(); final int inParallelism2 = getSecondPredecessorNode().getParallelism(); if (!areBranchCompatible(child1, child2)) { continue; instantiate(operator, c1, c2, broadcastPlanChannels, outputPlans, estimator, igps, igps, noLocalProps, noLocalProps); estimator.costOperator(node); prunePlanAlternatives(outputPlans); outputPlans.trimToSize();
@Override public void computeOutputEstimates(DataStatistics statistics) { OptimizerNode in1 = getFirstPredecessorNode(); OptimizerNode in2 = getSecondPredecessorNode(); this.estimatedNumRecords = in1.estimatedNumRecords > 0 && in2.estimatedNumRecords > 0 ? in1.estimatedNumRecords + in2.estimatedNumRecords : -1; this.estimatedOutputSize = in1.estimatedOutputSize > 0 && in2.estimatedOutputSize > 0 ? in1.estimatedOutputSize + in2.estimatedOutputSize : -1; }
@Override public void computeUnionOfInterestingPropertiesFromSuccessors() { super.computeUnionOfInterestingPropertiesFromSuccessors(); // clear all local properties, as they are destroyed anyways getInterestingProperties().getLocalProperties().clear(); }
n = new BinaryUnionNode((Union<?>) c);
@Override public void addOutgoingConnection(DagConnection connection) { // ensure that union nodes have not more than one outgoing connection. if (this.getOutgoingConnections() != null && this.getOutgoingConnections().size() > 0) { throw new CompilerException("BinaryUnionNode may only have a single outgoing connection."); } super.addOutgoingConnection(connection); }
if (this.getOutgoingConnections().size() > 1) { throw new CompilerException("BinaryUnionNode has more than one successor."); final List<? extends PlanNode> subPlans1 = getFirstPredecessorNode().getAlternativePlans(estimator); final List<? extends PlanNode> subPlans2 = getSecondPredecessorNode().getAlternativePlans(estimator); List<DagConnection> broadcastConnections = getBroadcastConnections(); if (broadcastConnections != null && broadcastConnections.size() > 0) { throw new CompilerException("Found BroadcastVariables on a Union operation"); final ExecutionMode input2Mode = this.input2.getDataExchangeMode(); final int parallelism = getParallelism(); final int inParallelism1 = getFirstPredecessorNode().getParallelism(); final int inParallelism2 = getSecondPredecessorNode().getParallelism(); if (!areBranchCompatible(child1, child2)) { continue; instantiate(operator, c1, c2, broadcastPlanChannels, outputPlans, estimator, igps, igps, noLocalProps, noLocalProps); estimator.costOperator(node); prunePlanAlternatives(outputPlans); outputPlans.trimToSize();
@Override public void computeOutputEstimates(DataStatistics statistics) { OptimizerNode in1 = getFirstPredecessorNode(); OptimizerNode in2 = getSecondPredecessorNode(); this.estimatedNumRecords = in1.estimatedNumRecords > 0 && in2.estimatedNumRecords > 0 ? in1.estimatedNumRecords + in2.estimatedNumRecords : -1; this.estimatedOutputSize = in1.estimatedOutputSize > 0 && in2.estimatedOutputSize > 0 ? in1.estimatedOutputSize + in2.estimatedOutputSize : -1; }
@Override public void computeUnionOfInterestingPropertiesFromSuccessors() { super.computeUnionOfInterestingPropertiesFromSuccessors(); // clear all local properties, as they are destroyed anyways getInterestingProperties().getLocalProperties().clear(); }