Fix deploy of WindowFunctions
### Motivation
In pulsar 2.5.0 deploying window functions fails because its class doesn't pass validation.
The behavior looks the same in current master.
### Modifications
Add `WindowFunction.class` to the list of allowed function classes
@@ -385,7 +385,8 @@ public class FunctionConfigUtils {
Class functionClass = clsLoader.loadClass(functionConfig.getClassName());
if (!org.apache.pulsar.functions.api.Function.class.isAssignableFrom(functionClass)
- && !java.util.function.Function.class.isAssignableFrom(functionClass)) {
+ && !java.util.function.Function.class.isAssignableFrom(functionClass)
+ && !org.apache.pulsar.functions.api.WindowFunction.class.isAssignableFrom(functionClass)) {
throw new IllegalArgumentException(
String.format("Function class %s does not implement the correct interface",
functionClass.getName()));
