Java源码示例:org.apache.flink.optimizer.operators.SortMergeLeftOuterJoinDescriptor

示例1
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;
	}
 
示例2
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;
	}
 
示例3
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;
	}