filterMethodsByTypeAffinity(udfMethods, argumentsPassed);
private void typeAffinity(String methodName, TypeInfo inputType, int expectedNumFoundMethods, Class expectedFoundType) { List<Method> mlist = getMethods(TestUDF.class, methodName); assertEquals(true, 1 < mlist.size()); List<TypeInfo> inputTypes = new ArrayList<TypeInfo>(); inputTypes.add(inputType); // narrow down the possible choices based on type affinity FunctionRegistry.filterMethodsByTypeAffinity(mlist, inputTypes); assertEquals(expectedNumFoundMethods, mlist.size()); if (expectedNumFoundMethods == 1) { assertEquals(expectedFoundType, mlist.get(0).getParameterTypes()[0]); } }
filterMethodsByTypeAffinity(udfMethods, argumentsPassed);
filterMethodsByTypeAffinity(udfMethods, argumentsPassed);