protected DualInputSemanticProperties extractSemanticAnnotationsFromUdf(Class<?> udfClass) { Set<Annotation> annotations = FunctionAnnotation.readDualForwardAnnotations(udfClass); return SemanticPropUtil.getSemanticPropsDual(annotations, getInput1Type(), getInput2Type(), getResultType()); }
@SuppressWarnings({ "rawtypes", "unchecked" }) public static void compareAnalyzerResultWithAnnotationsDualInputWithKeys(Class<?> baseClass, Class<?> clazz, TypeInformation<?> in1Type, TypeInformation<?> in2Type, TypeInformation<?> outType, String[] keys1, String[] keys2) { // expected final Set<Annotation> annotations = FunctionAnnotation.readDualForwardAnnotations(clazz); final DualInputSemanticProperties expected = SemanticPropUtil.getSemanticPropsDual(annotations, in1Type, in2Type, outType); // actual final UdfAnalyzer ua = new UdfAnalyzer(baseClass, clazz, "operator", in1Type, in2Type, outType, (keys1 == null) ? null : new Keys.ExpressionKeys(keys1, in1Type), (keys2 == null) ? null : new Keys.ExpressionKeys( keys2, in2Type), true); ua.analyze(); final DualInputSemanticProperties actual = (DualInputSemanticProperties) ua.getSemanticProperties(); assertEquals(expected.toString(), actual.toString()); }
protected DualInputSemanticProperties extractSemanticAnnotationsFromUdf(Class<?> udfClass) { Set<Annotation> annotations = FunctionAnnotation.readDualForwardAnnotations(udfClass); return SemanticPropUtil.getSemanticPropsDual(annotations, getInput1Type(), getInput2Type(), getResultType()); }
protected DualInputSemanticProperties extractSemanticAnnotationsFromUdf(Class<?> udfClass) { Set<Annotation> annotations = FunctionAnnotation.readDualForwardAnnotations(udfClass); return SemanticPropUtil.getSemanticPropsDual(annotations, getInput1Type(), getInput2Type(), getResultType()); }