Search in sources :

Example 11 with OperatorDescriptorDual

use of org.apache.flink.optimizer.operators.OperatorDescriptorDual in project flink by apache.

the class OuterJoinNode method createRightOuterJoinDescriptors.

private List<OperatorDescriptorDual> createRightOuterJoinDescriptors(JoinHint hint) {
    List<OperatorDescriptorDual> list = new ArrayList<>();
    switch(hint) {
        case OPTIMIZER_CHOOSES:
            list.add(new SortMergeRightOuterJoinDescriptor(this.keys1, this.keys2, true));
            list.add(new HashRightOuterJoinBuildFirstDescriptor(this.keys1, this.keys2, true, true));
            break;
        case REPARTITION_SORT_MERGE:
            list.add(new SortMergeRightOuterJoinDescriptor(this.keys1, this.keys2, false));
            break;
        case REPARTITION_HASH_FIRST:
            list.add(new HashRightOuterJoinBuildFirstDescriptor(this.keys1, this.keys2, false, true));
            break;
        case BROADCAST_HASH_FIRST:
            list.add(new HashRightOuterJoinBuildFirstDescriptor(this.keys1, this.keys2, true, false));
            break;
        case REPARTITION_HASH_SECOND:
            list.add(new HashRightOuterJoinBuildSecondDescriptor(this.keys1, this.keys2, false, true));
            break;
        case BROADCAST_HASH_SECOND:
        default:
            throw new CompilerException("Invalid join hint: " + hint + " for right outer join");
    }
    return list;
}
Also used : ArrayList(java.util.ArrayList) SortMergeRightOuterJoinDescriptor(org.apache.flink.optimizer.operators.SortMergeRightOuterJoinDescriptor) CompilerException(org.apache.flink.optimizer.CompilerException) HashRightOuterJoinBuildFirstDescriptor(org.apache.flink.optimizer.operators.HashRightOuterJoinBuildFirstDescriptor) OperatorDescriptorDual(org.apache.flink.optimizer.operators.OperatorDescriptorDual) HashRightOuterJoinBuildSecondDescriptor(org.apache.flink.optimizer.operators.HashRightOuterJoinBuildSecondDescriptor)

Aggregations

OperatorDescriptorDual (org.apache.flink.optimizer.operators.OperatorDescriptorDual)11 CompilerException (org.apache.flink.optimizer.CompilerException)5 ArrayList (java.util.ArrayList)4 LocalPropertiesPair (org.apache.flink.optimizer.operators.OperatorDescriptorDual.LocalPropertiesPair)3 Ordering (org.apache.flink.api.common.operators.Ordering)2 AbstractJoinDescriptor (org.apache.flink.optimizer.operators.AbstractJoinDescriptor)2 HashJoinBuildFirstProperties (org.apache.flink.optimizer.operators.HashJoinBuildFirstProperties)2 HashJoinBuildSecondProperties (org.apache.flink.optimizer.operators.HashJoinBuildSecondProperties)2 GlobalPropertiesPair (org.apache.flink.optimizer.operators.OperatorDescriptorDual.GlobalPropertiesPair)2 Channel (org.apache.flink.optimizer.plan.Channel)2 NamedChannel (org.apache.flink.optimizer.plan.NamedChannel)2 HashSet (java.util.HashSet)1 Set (java.util.Set)1 ExecutionMode (org.apache.flink.api.common.ExecutionMode)1 JoinHint (org.apache.flink.api.common.operators.base.JoinOperatorBase.JoinHint)1 OuterJoinType (org.apache.flink.api.common.operators.base.OuterJoinOperatorBase.OuterJoinType)1 Configuration (org.apache.flink.configuration.Configuration)1 InterestingProperties (org.apache.flink.optimizer.dataproperties.InterestingProperties)1 RequestedGlobalProperties (org.apache.flink.optimizer.dataproperties.RequestedGlobalProperties)1 RequestedLocalProperties (org.apache.flink.optimizer.dataproperties.RequestedLocalProperties)1