use of com.facebook.presto.sql.planner.optimizations.StreamPreferredProperties in project presto by prestodb.
the class RuntimeReorderJoinSides method checkBuildSidePropertySatisfied.
// Check if the property of a planNode satisfies the requirements for directly feeding as the build side of a JoinNode.
private boolean checkBuildSidePropertySatisfied(PlanNode node, List<VariableReferenceExpression> partitioningColumns, Context context) {
StreamPreferredProperties requiredBuildProperty;
if (getTaskConcurrency(context.getSession()) > 1) {
requiredBuildProperty = exactlyPartitionedOn(partitioningColumns);
} else {
requiredBuildProperty = singleStream();
}
StreamProperties nodeProperty = derivePropertiesRecursively(node, metadata, parser, context);
return requiredBuildProperty.isSatisfiedBy(nodeProperty);
}
use of com.facebook.presto.sql.planner.optimizations.StreamPreferredProperties in project presto by prestodb.
the class RuntimeReorderJoinSides method checkProbeSidePropertySatisfied.
// Check if the new probe side after removing unnecessary local exchange is valid.
private boolean checkProbeSidePropertySatisfied(PlanNode node, Context context) {
StreamPreferredProperties requiredProbeProperty;
if (isSpillEnabled(context.getSession()) && isJoinSpillingEnabled(context.getSession())) {
requiredProbeProperty = fixedParallelism();
} else {
requiredProbeProperty = defaultParallelism(context.getSession());
}
StreamProperties nodeProperty = derivePropertiesRecursively(node, metadata, parser, context);
return requiredProbeProperty.isSatisfiedBy(nodeProperty);
}
Aggregations