public static <T> Write<T> write(String jdbcUrl, String table) {
    return new AutoValue_ClickHouseIO_Write.Builder<T>()
        .jdbcUrl(jdbcUrl)
        .table(table)
        .properties(new Properties())
        .maxInsertBlockSize(DEFAULT_MAX_INSERT_BLOCK_SIZE)
        .initialBackoff(DEFAULT_INITIAL_BACKOFF)
        .maxRetries(DEFAULT_MAX_RETRIES)
        .maxCumulativeBackoff(DEFAULT_MAX_CUMULATIVE_BACKOFF)
        .build()
        .withInsertDeduplicate(true)
        .withInsertDistributedSync(true);
  }
@Test
  public void testInt64WithDefault() throws Exception {
    Schema schema = Schema.of(Schema.Field.nullable("f0", FieldType.INT64));
    Row row1 = Row.withSchema(schema).addValue(1L).build();
    Row row2 = Row.withSchema(schema).addValue(null).build();
    Row row3 = Row.withSchema(schema).addValue(3L).build();

    executeSql("CREATE TABLE test_int64_with_default (f0 Int64 DEFAULT -1) ENGINE=Log");

    pipeline
        .apply(Create.of(row1, row2, row3).withRowSchema(schema))
        .apply(write("test_int64_with_default"));

    pipeline.run().waitUntilFinish();

    long sum = executeQueryAsLong("SELECT SUM(f0) FROM test_int64_with_default");

    assertEquals(3L, sum);
  }