@Override
    public long executeLargeUpdate() throws SQLException {
        checkClosed();

        // commit whatever changes
        try {
            writer.commitRow();
        } catch (Exception e) {
            throw new SQLException(e);
        }

        int updateCount = 0;
        InputStream in = new ByteArrayInputStream(out.toByteArray());
        InsertSettings settings = new InsertSettings();
        try (InsertResponse response = queryTimeout == 0 ?
                connection.client.insert(tableSchema.getTableName(),in, writer.getFormat(), settings).get()
                : connection.client.insert(tableSchema.getTableName(),in, writer.getFormat(), settings).get(queryTimeout, TimeUnit.SECONDS)) {
            currentResultSet = null;
            updateCount = Math.max(0, (int) response.getWrittenRows()); // when statement alters schema no result rows returned.
            metrics = response.getMetrics();
            lastQueryId = response.getQueryId();
        } catch (Exception e) {
            throw ExceptionUtils.toSqlState(e);
        } finally {
            try {
                resetWriter();
            } catch (Exception e) {
                // ignore
            }
        }
        return updateCount;
    }
Implements data streaming through Client Writer API.
See {@link PreparedStatementImpl}
jdbc-v2/src/main/java/com/clickhouse/jdbc/WriterStatementImpl.java