Search in sources :

Example 1 with KeySelector1

use of org.apache.flink.api.common.operators.SelectorFunctionKeysTest.KeySelector1 in project flink by apache.

the class ExpressionKeysTest method testAreCompatible8.

@Test
public void testAreCompatible8() throws Keys.IncompatibleKeysException {
    TypeInformation<String> t1 = BasicTypeInfo.STRING_TYPE_INFO;
    TypeInformation<Pojo2> t2 = TypeExtractor.getForClass(Pojo2.class);
    ExpressionKeys<String> ek1 = new ExpressionKeys<>("*", t1);
    Keys<Pojo2> ek2 = new Keys.SelectorFunctionKeys<>(new KeySelector1(), t2, BasicTypeInfo.STRING_TYPE_INFO);
    Assert.assertTrue(ek1.areCompatible(ek2));
}
Also used : KeySelector1(org.apache.flink.api.common.operators.SelectorFunctionKeysTest.KeySelector1) ExpressionKeys(org.apache.flink.api.common.operators.Keys.ExpressionKeys) Test(org.junit.Test)

Aggregations

ExpressionKeys (org.apache.flink.api.common.operators.Keys.ExpressionKeys)1 KeySelector1 (org.apache.flink.api.common.operators.SelectorFunctionKeysTest.KeySelector1)1 Test (org.junit.Test)1