Java Code Examples for org.apache.flink.api.common.operators.Keys.ExpressionKeys#areCompatible()

The following examples show how to use org.apache.flink.api.common.operators.Keys.ExpressionKeys#areCompatible() . 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: ExpressionKeysTest.java    From Flink-CEPplus with Apache License 2.0 5 votes vote down vote up
@Test(expected = Keys.IncompatibleKeysException.class)
public void testAreCompatible6() throws Keys.IncompatibleKeysException {
	TypeInformation<Pojo1> t1 = TypeExtractor.getForClass(Pojo1.class);
	TypeInformation<Tuple2<String, Long>> t2 = new TupleTypeInfo<>(
		BasicTypeInfo.STRING_TYPE_INFO,
		BasicTypeInfo.LONG_TYPE_INFO
	);

	ExpressionKeys<Pojo1> ek1 = new ExpressionKeys<>("a", t1);
	ExpressionKeys<Tuple2<String, Long>> ek2 = new ExpressionKeys<>(1, t2);

	ek1.areCompatible(ek2);
}
 
Example 2
Source File: ExpressionKeysTest.java    From Flink-CEPplus with Apache License 2.0 5 votes vote down vote up
@Test(expected = Keys.IncompatibleKeysException.class)
public void testAreCompatible7() throws Keys.IncompatibleKeysException {
	TypeInformation<Pojo1> t1 = TypeExtractor.getForClass(Pojo1.class);
	TypeInformation<Tuple2<String, Long>> t2 = new TupleTypeInfo<>(
		BasicTypeInfo.STRING_TYPE_INFO,
		BasicTypeInfo.LONG_TYPE_INFO
	);

	ExpressionKeys<Pojo1> ek1 = new ExpressionKeys<>(new String[]{"a", "b"}, t1);
	ExpressionKeys<Tuple2<String, Long>> ek2 = new ExpressionKeys<>(0, t2);

	ek1.areCompatible(ek2);
}
 
Example 3
Source File: ExpressionKeysTest.java    From flink with Apache License 2.0 5 votes vote down vote up
@Test(expected = Keys.IncompatibleKeysException.class)
public void testAreCompatible6() throws Keys.IncompatibleKeysException {
	TypeInformation<Pojo1> t1 = TypeExtractor.getForClass(Pojo1.class);
	TypeInformation<Tuple2<String, Long>> t2 = new TupleTypeInfo<>(
		BasicTypeInfo.STRING_TYPE_INFO,
		BasicTypeInfo.LONG_TYPE_INFO
	);

	ExpressionKeys<Pojo1> ek1 = new ExpressionKeys<>("a", t1);
	ExpressionKeys<Tuple2<String, Long>> ek2 = new ExpressionKeys<>(1, t2);

	ek1.areCompatible(ek2);
}
 
Example 4
Source File: ExpressionKeysTest.java    From flink with Apache License 2.0 5 votes vote down vote up
@Test(expected = Keys.IncompatibleKeysException.class)
public void testAreCompatible7() throws Keys.IncompatibleKeysException {
	TypeInformation<Pojo1> t1 = TypeExtractor.getForClass(Pojo1.class);
	TypeInformation<Tuple2<String, Long>> t2 = new TupleTypeInfo<>(
		BasicTypeInfo.STRING_TYPE_INFO,
		BasicTypeInfo.LONG_TYPE_INFO
	);

	ExpressionKeys<Pojo1> ek1 = new ExpressionKeys<>(new String[]{"a", "b"}, t1);
	ExpressionKeys<Tuple2<String, Long>> ek2 = new ExpressionKeys<>(0, t2);

	ek1.areCompatible(ek2);
}
 
Example 5
Source File: ExpressionKeysTest.java    From flink with Apache License 2.0 5 votes vote down vote up
@Test(expected = Keys.IncompatibleKeysException.class)
public void testAreCompatible6() throws Keys.IncompatibleKeysException {
	TypeInformation<Pojo1> t1 = TypeExtractor.getForClass(Pojo1.class);
	TypeInformation<Tuple2<String, Long>> t2 = new TupleTypeInfo<>(
		BasicTypeInfo.STRING_TYPE_INFO,
		BasicTypeInfo.LONG_TYPE_INFO
	);

	ExpressionKeys<Pojo1> ek1 = new ExpressionKeys<>("a", t1);
	ExpressionKeys<Tuple2<String, Long>> ek2 = new ExpressionKeys<>(1, t2);

	ek1.areCompatible(ek2);
}
 
Example 6
Source File: ExpressionKeysTest.java    From flink with Apache License 2.0 5 votes vote down vote up
@Test(expected = Keys.IncompatibleKeysException.class)
public void testAreCompatible7() throws Keys.IncompatibleKeysException {
	TypeInformation<Pojo1> t1 = TypeExtractor.getForClass(Pojo1.class);
	TypeInformation<Tuple2<String, Long>> t2 = new TupleTypeInfo<>(
		BasicTypeInfo.STRING_TYPE_INFO,
		BasicTypeInfo.LONG_TYPE_INFO
	);

	ExpressionKeys<Pojo1> ek1 = new ExpressionKeys<>(new String[]{"a", "b"}, t1);
	ExpressionKeys<Tuple2<String, Long>> ek2 = new ExpressionKeys<>(0, t2);

	ek1.areCompatible(ek2);
}