public static String computeQueryHash(String query)
    {
        requireNonNull(query, "query is null");

        if (query.isEmpty()) {
            return "";
        }

        byte[] queryBytes = query.getBytes(UTF_8);
        long queryHash = new XxHash64().update(queryBytes).hash();
        return toHexString(queryHash);
    }
@Test
    public void testComputeQueryHashEquivalentStrings()
    {
        String query1 = "SELECT * FROM REPORTS WHERE YEAR >= 2000 AND ID = 293";
        String query2 = "SELECT * FROM REPORTS WHERE YEAR >= 2000 AND ID = 293";
        assertEquals(computeQueryHash(query1), computeQueryHash(query2));
    }