presto-main/src/main/java/io/prestosql/operator/window/ReflectionWindowFunctionSupplier.java/ReflectionWindowFunctionSupplier/ReflectionWindowFunctionSupplier
class ReflectionWindowFunctionSupplier:    public ReflectionWindowFunctionSupplier(Signature signature, Class<T> type)
    {
        super(signature, getDescription(requireNonNull(type, "type is null")));
        try {
            Constructor<T> constructor;
            ConstructorType constructorType;

            if (signature.getArgumentTypes().isEmpty()) {
                constructor = type.getConstructor();
                constructorType = ConstructorType.NO_INPUTS;
            }
            else if (ValueWindowFunction.class.isAssignableFrom(type)) {
                try {
                    constructor = type.getConstructor(List.class, boolean.class);
                    constructorType = ConstructorType.INPUTS_IGNORE_NULLS;
                }
                catch (NoSuchMethodException e) {
                    // Fallback to default constructor.
                    constructor = type.getConstructor(List.class);
                    constructorType = ConstructorType.INPUTS;
                }
            }
            else {
                constructor = type.getConstructor(List.class);
                constructorType = ConstructorType.INPUTS;
            }

            this.constructor = constructor;
            this.constructorType = constructorType;
        }
        catch (NoSuchMethodException e) {
            throw new RuntimeException(e);
        }
    }