@Description("Poisson cdf given the lambda (mean) parameter and value")
    @ScalarFunction
    @SqlType(StandardTypes.DOUBLE)
    public static double poissonCdf(
            @SqlType(StandardTypes.DOUBLE) double lambda,
            @SqlType(StandardTypes.INTEGER) long value)
    {
        checkCondition(value >= 0, INVALID_FUNCTION_ARGUMENT, "poissonCdf Function: value must be a non-negative integer");
        checkCondition(lambda > 0, INVALID_FUNCTION_ARGUMENT, "poissonCdf Function: lambda must be greater than 0");
        PoissonDistribution distribution = new PoissonDistribution(lambda);
        return distribution.cumulativeProbability((int) value);
    }
@Test
    public void testPoissonCdf()
    {
        assertFunction("round(poisson_cdf(10, 0), 2)", DOUBLE, 0.0);
        assertFunction("round(poisson_cdf(3, 5), 2)", DOUBLE, 0.92);

        assertInvalidFunction("poisson_cdf(-3, 5)", "poissonCdf Function: lambda must be greater than 0");
        assertInvalidFunction("poisson_cdf(3, -10)", "poissonCdf Function: value must be a non-negative integer");
    }