Java Code Examples for org.apache.flink.runtime.operators.DriverStrategy#INNER_MERGE

The following examples show how to use org.apache.flink.runtime.operators.DriverStrategy#INNER_MERGE . 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: RelationalQueryCompilerTest.java    From Flink-CEPplus with Apache License 2.0 6 votes vote down vote up
private boolean checkBroadcastMergeJoin(DualInputPlanNode join, SingleInputPlanNode reducer) {
	if (DriverStrategy.INNER_MERGE == join.getDriverStrategy()) {
		// driver keys
		Assert.assertEquals(set0, join.getKeysForInput1());
		Assert.assertEquals(set0, join.getKeysForInput2());

		// local strategies
		Assert.assertEquals(LocalStrategy.SORT, join.getInput1().getLocalStrategy());
		Assert.assertEquals(LocalStrategy.SORT, join.getInput2().getLocalStrategy());
		Assert.assertEquals(LocalStrategy.COMBININGSORT, reducer.getInput().getLocalStrategy());

		// local strategy keys
		Assert.assertEquals(set0, join.getInput1().getLocalStrategyKeys());
		Assert.assertEquals(set0, join.getInput2().getLocalStrategyKeys());
		Assert.assertTrue(Arrays.equals(join.getInput1().getLocalStrategySortOrder(), join.getInput2().getLocalStrategySortOrder()));
		Assert.assertEquals(set01, reducer.getInput().getLocalStrategyKeys());
		Assert.assertEquals(set01, reducer.getKeys(0));
		Assert.assertTrue(Arrays.equals(reducer.getInput().getLocalStrategySortOrder(), reducer.getSortOrders(0)));
		return true;
	} else {
		return false;
	}
}
 
Example 2
Source File: RelationalQueryCompilerTest.java    From Flink-CEPplus with Apache License 2.0 6 votes vote down vote up
private boolean checkRepartitionMergeJoin(DualInputPlanNode join, SingleInputPlanNode reducer) {
	if (DriverStrategy.INNER_MERGE == join.getDriverStrategy()) {
		// driver keys
		Assert.assertEquals(set0, join.getKeysForInput1());
		Assert.assertEquals(set0, join.getKeysForInput2());

		// local strategies
		Assert.assertEquals(LocalStrategy.SORT, join.getInput1().getLocalStrategy());
		Assert.assertEquals(LocalStrategy.SORT, join.getInput2().getLocalStrategy());
		Assert.assertEquals(LocalStrategy.NONE, reducer.getInput().getLocalStrategy());

		// local strategy keys
		Assert.assertEquals(set01, join.getInput1().getLocalStrategyKeys());
		Assert.assertEquals(set0, join.getInput2().getLocalStrategyKeys());
		Assert.assertTrue(join.getInput1().getLocalStrategySortOrder()[0] == join.getInput2().getLocalStrategySortOrder()[0]);
		Assert.assertEquals(set01, reducer.getKeys(0));
		Assert.assertTrue(Arrays.equals(join.getInput1().getLocalStrategySortOrder(), reducer.getSortOrders(0)));
		return true;
	} else {
		return false;
	}
}
 
Example 3
Source File: RelationalQueryCompilerTest.java    From flink with Apache License 2.0 6 votes vote down vote up
private boolean checkBroadcastMergeJoin(DualInputPlanNode join, SingleInputPlanNode reducer) {
	if (DriverStrategy.INNER_MERGE == join.getDriverStrategy()) {
		// driver keys
		Assert.assertEquals(set0, join.getKeysForInput1());
		Assert.assertEquals(set0, join.getKeysForInput2());

		// local strategies
		Assert.assertEquals(LocalStrategy.SORT, join.getInput1().getLocalStrategy());
		Assert.assertEquals(LocalStrategy.SORT, join.getInput2().getLocalStrategy());
		Assert.assertEquals(LocalStrategy.COMBININGSORT, reducer.getInput().getLocalStrategy());

		// local strategy keys
		Assert.assertEquals(set0, join.getInput1().getLocalStrategyKeys());
		Assert.assertEquals(set0, join.getInput2().getLocalStrategyKeys());
		Assert.assertTrue(Arrays.equals(join.getInput1().getLocalStrategySortOrder(), join.getInput2().getLocalStrategySortOrder()));
		Assert.assertEquals(set01, reducer.getInput().getLocalStrategyKeys());
		Assert.assertEquals(set01, reducer.getKeys(0));
		Assert.assertTrue(Arrays.equals(reducer.getInput().getLocalStrategySortOrder(), reducer.getSortOrders(0)));
		return true;
	} else {
		return false;
	}
}
 
Example 4
Source File: RelationalQueryCompilerTest.java    From flink with Apache License 2.0 6 votes vote down vote up
private boolean checkRepartitionMergeJoin(DualInputPlanNode join, SingleInputPlanNode reducer) {
	if (DriverStrategy.INNER_MERGE == join.getDriverStrategy()) {
		// driver keys
		Assert.assertEquals(set0, join.getKeysForInput1());
		Assert.assertEquals(set0, join.getKeysForInput2());

		// local strategies
		Assert.assertEquals(LocalStrategy.SORT, join.getInput1().getLocalStrategy());
		Assert.assertEquals(LocalStrategy.SORT, join.getInput2().getLocalStrategy());
		Assert.assertEquals(LocalStrategy.NONE, reducer.getInput().getLocalStrategy());

		// local strategy keys
		Assert.assertEquals(set01, join.getInput1().getLocalStrategyKeys());
		Assert.assertEquals(set0, join.getInput2().getLocalStrategyKeys());
		Assert.assertTrue(join.getInput1().getLocalStrategySortOrder()[0] == join.getInput2().getLocalStrategySortOrder()[0]);
		Assert.assertEquals(set01, reducer.getKeys(0));
		Assert.assertTrue(Arrays.equals(join.getInput1().getLocalStrategySortOrder(), reducer.getSortOrders(0)));
		return true;
	} else {
		return false;
	}
}
 
Example 5
Source File: RelationalQueryCompilerTest.java    From flink with Apache License 2.0 6 votes vote down vote up
private boolean checkBroadcastMergeJoin(DualInputPlanNode join, SingleInputPlanNode reducer) {
	if (DriverStrategy.INNER_MERGE == join.getDriverStrategy()) {
		// driver keys
		Assert.assertEquals(set0, join.getKeysForInput1());
		Assert.assertEquals(set0, join.getKeysForInput2());

		// local strategies
		Assert.assertEquals(LocalStrategy.SORT, join.getInput1().getLocalStrategy());
		Assert.assertEquals(LocalStrategy.SORT, join.getInput2().getLocalStrategy());
		Assert.assertEquals(LocalStrategy.COMBININGSORT, reducer.getInput().getLocalStrategy());

		// local strategy keys
		Assert.assertEquals(set0, join.getInput1().getLocalStrategyKeys());
		Assert.assertEquals(set0, join.getInput2().getLocalStrategyKeys());
		Assert.assertTrue(Arrays.equals(join.getInput1().getLocalStrategySortOrder(), join.getInput2().getLocalStrategySortOrder()));
		Assert.assertEquals(set01, reducer.getInput().getLocalStrategyKeys());
		Assert.assertEquals(set01, reducer.getKeys(0));
		Assert.assertTrue(Arrays.equals(reducer.getInput().getLocalStrategySortOrder(), reducer.getSortOrders(0)));
		return true;
	} else {
		return false;
	}
}
 
Example 6
Source File: RelationalQueryCompilerTest.java    From flink with Apache License 2.0 6 votes vote down vote up
private boolean checkRepartitionMergeJoin(DualInputPlanNode join, SingleInputPlanNode reducer) {
	if (DriverStrategy.INNER_MERGE == join.getDriverStrategy()) {
		// driver keys
		Assert.assertEquals(set0, join.getKeysForInput1());
		Assert.assertEquals(set0, join.getKeysForInput2());

		// local strategies
		Assert.assertEquals(LocalStrategy.SORT, join.getInput1().getLocalStrategy());
		Assert.assertEquals(LocalStrategy.SORT, join.getInput2().getLocalStrategy());
		Assert.assertEquals(LocalStrategy.NONE, reducer.getInput().getLocalStrategy());

		// local strategy keys
		Assert.assertEquals(set01, join.getInput1().getLocalStrategyKeys());
		Assert.assertEquals(set0, join.getInput2().getLocalStrategyKeys());
		Assert.assertTrue(join.getInput1().getLocalStrategySortOrder()[0] == join.getInput2().getLocalStrategySortOrder()[0]);
		Assert.assertEquals(set01, reducer.getKeys(0));
		Assert.assertTrue(Arrays.equals(join.getInput1().getLocalStrategySortOrder(), reducer.getSortOrders(0)));
		return true;
	} else {
		return false;
	}
}
 
Example 7
Source File: SortMergeInnerJoinDescriptor.java    From Flink-CEPplus with Apache License 2.0 4 votes vote down vote up
@Override
public DriverStrategy getStrategy() {
	return DriverStrategy.INNER_MERGE;
}
 
Example 8
Source File: SortMergeInnerJoinDescriptor.java    From flink with Apache License 2.0 4 votes vote down vote up
@Override
public DriverStrategy getStrategy() {
	return DriverStrategy.INNER_MERGE;
}
 
Example 9
Source File: SortMergeInnerJoinDescriptor.java    From flink with Apache License 2.0 4 votes vote down vote up
@Override
public DriverStrategy getStrategy() {
	return DriverStrategy.INNER_MERGE;
}