org.apache.flink.optimizer.operators.SortMergeLeftOuterJoinDescriptor Java Examples

The following examples show how to use org.apache.flink.optimizer.operators.SortMergeLeftOuterJoinDescriptor. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: OuterJoinNode.java    From Flink-CEPplus with Apache License 2.0 6 votes vote down vote up
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;
	}
 
Example #2
Source File: OuterJoinNode.java    From flink with Apache License 2.0 6 votes vote down vote up
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;
	}
 
Example #3
Source File: OuterJoinNode.java    From flink with Apache License 2.0 6 votes vote down vote up
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;
	}