private void resetWriter() throws IOException {
        if (out != null) {
            out.close();
        }

        out = new ByteArrayOutputStream();
        writer = new RowBinaryFormatWriter(out, tableSchema, tableSchema.hasDefaults() ?
                ClickHouseFormat.RowBinaryWithDefaults : ClickHouseFormat.RowBinary);
    }
Implements data streaming through Client Writer API.
See {@link PreparedStatementImpl}
jdbc-v2/src/main/java/com/clickhouse/jdbc/WriterStatementImpl.java