@Override public PlanNodeCostEstimate visitJoin(JoinNode node, Void context) { return calculateJoinExchangeCost( node.getLeft(), node.getRight(), stats, types, Objects.equals(node.getDistributionType(), Optional.of(JoinNode.DistributionType.REPLICATED)), taskCountEstimator.estimateSourceDistributedTaskCount()); }
@Override public PlanNodeCostEstimate visitSemiJoin(SemiJoinNode node, Void context) { return calculateJoinExchangeCost( node.getSource(), node.getFilteringSource(), stats, types, Objects.equals(node.getDistributionType(), Optional.of(SemiJoinNode.DistributionType.REPLICATED)), taskCountEstimator.estimateSourceDistributedTaskCount()); }
@Override public PlanNodeCostEstimate visitSpatialJoin(SpatialJoinNode node, Void context) { return calculateJoinExchangeCost( node.getLeft(), node.getRight(), stats, types, node.getDistributionType() == SpatialJoinNode.DistributionType.REPLICATED, taskCountEstimator.estimateSourceDistributedTaskCount()); }
private PlanNodeCostEstimate calculateJoinCost(PlanNode join, PlanNode probe, PlanNode build, boolean replicated) { PlanNodeCostEstimate joinInputCost = calculateJoinInputCost( probe, build, stats, types, replicated, taskCountEstimator.estimateSourceDistributedTaskCount()); PlanNodeCostEstimate joinOutputCost = calculateJoinOutputCost(join); return joinInputCost.add(joinOutputCost); }
int estimatedSourceDistributedTaskCount = taskCountEstimator.estimateSourceDistributedTaskCount(); PlanNodeCostEstimate cost = calculateJoinCostWithoutOutput( possibleJoinNode.getLeft(),
int estimatedSourceDistributedTaskCount = taskCountEstimator.estimateSourceDistributedTaskCount(); PlanNodeCostEstimate cost = calculateJoinCostWithoutOutput( possibleJoinNode.getSource(),
return calculateRemoteReplicateCost(inputSizeInBytes, taskCountEstimator.estimateSourceDistributedTaskCount()); default: throw new IllegalArgumentException("Unexpected type: " + node.getType());