Search in sources :

Example 1 with StreamPreferredProperties

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);
}
Also used : StreamPreferredProperties(com.facebook.presto.sql.planner.optimizations.StreamPreferredProperties) StreamProperties(com.facebook.presto.sql.planner.optimizations.StreamPropertyDerivations.StreamProperties)

Example 2 with StreamPreferredProperties

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);
}
Also used : StreamPreferredProperties(com.facebook.presto.sql.planner.optimizations.StreamPreferredProperties) StreamProperties(com.facebook.presto.sql.planner.optimizations.StreamPropertyDerivations.StreamProperties)

Aggregations

StreamPreferredProperties (com.facebook.presto.sql.planner.optimizations.StreamPreferredProperties)2 StreamProperties (com.facebook.presto.sql.planner.optimizations.StreamPropertyDerivations.StreamProperties)2