Search in sources :

Example 1 with HashLeftOuterJoinBuildFirstDescriptor

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

the class OuterJoinNode method createLeftOuterJoinDescriptors.

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

Aggregations

ArrayList (java.util.ArrayList)1 CompilerException (org.apache.flink.optimizer.CompilerException)1 HashLeftOuterJoinBuildFirstDescriptor (org.apache.flink.optimizer.operators.HashLeftOuterJoinBuildFirstDescriptor)1 HashLeftOuterJoinBuildSecondDescriptor (org.apache.flink.optimizer.operators.HashLeftOuterJoinBuildSecondDescriptor)1 OperatorDescriptorDual (org.apache.flink.optimizer.operators.OperatorDescriptorDual)1 SortMergeLeftOuterJoinDescriptor (org.apache.flink.optimizer.operators.SortMergeLeftOuterJoinDescriptor)1