Search in sources :

Example 1 with HashRightOuterJoinBuildSecondDescriptor

use of org.apache.flink.optimizer.operators.HashRightOuterJoinBuildSecondDescriptor 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

ArrayList (java.util.ArrayList)1 CompilerException (org.apache.flink.optimizer.CompilerException)1 HashRightOuterJoinBuildFirstDescriptor (org.apache.flink.optimizer.operators.HashRightOuterJoinBuildFirstDescriptor)1 HashRightOuterJoinBuildSecondDescriptor (org.apache.flink.optimizer.operators.HashRightOuterJoinBuildSecondDescriptor)1 OperatorDescriptorDual (org.apache.flink.optimizer.operators.OperatorDescriptorDual)1 SortMergeRightOuterJoinDescriptor (org.apache.flink.optimizer.operators.SortMergeRightOuterJoinDescriptor)1