Enforce instance factory MethodHandle not to have parameter
@@ -65,6 +65,7 @@ public final class ScalarFunctionImplementation
if (instanceFactory.isPresent()) {
Class<?> instanceType = instanceFactory.get().type().returnType();
+ checkArgument(instanceFactory.get().type().parameterList().size() == 0, "instanceFactory should have no parameter");
checkArgument(instanceType.equals(methodHandle.type().parameterType(0)), "methodHandle is not an instance method");
}
