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 testComputeQueryHashLongQuery()
    {
        String longQuery = "SELECT x" + repeat(",x", 500_000) + " FROM (VALUES 1,2,3,4,5) t(x)";
        assertEquals(computeQueryHash(longQuery), "26691c4d35d09c7b");
    }