private static String randomString(int n, Random rand) {
        String letters = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
        StringBuilder sb = new StringBuilder();
        for (int i = 0; i < n; i++) {
            int index = rand.nextInt(letters.length());
            sb.append(letters.charAt(index));
        }
        return sb.toString();
    }
Formatter for the DateTime type with nanoseconds.
performance/src/main/java/com/clickhouse/benchmark/data/DataSetGenerator.java