@ScalarFunction
    @SqlType(StandardTypes.DOUBLE)
    public static double jaccardIndex(@SqlType(KHyperLogLogType.NAME) Slice slice1, @SqlType(KHyperLogLogType.NAME) Slice slice2)
    {
        KHyperLogLog khll1 = KHyperLogLog.newInstance(slice1);
        KHyperLogLog khll2 = KHyperLogLog.newInstance(slice2);

        return KHyperLogLog.jaccardIndex(khll1, khll2);
    }
@Test
    public void testJaccardIndex()
    {
        int blockSize = 10;
        long uniqueElements = 10000 * blockSize;
        double error = ((double) 2 / 3) * 0.05;

        List<KHyperLogLog> list1 = buildKHyperLogLogs(blockSize, uniqueElements, threshold, potential);

        List<KHyperLogLog> list2 = buildKHyperLogLogs((int) (blockSize * 1.5), (int) (uniqueElements * 1.5), threshold, potential);

        String projection = getJaccardIndexProjection(list1, list2);

        functionAssertions.assertFunctionWithError(projection, DOUBLE, (double) 2 / 3, error);
    }