@Override
    public synchronized void writeRecord(T row) throws IOException {
        addBatch(row);
        boolean valid = (executionOptions.getBatchSize() > 0 && size >= executionOptions.getBatchSize())
                || batchBytes >= executionOptions.getMaxBatchBytes();
        if (valid && !flushing) {
            flush();
        }
    }
A builder used to set parameters to the output format's configuration in a fluent way.

@return builder
inlong-sort/sort-flink/sort-flink-v1.13/sort-connectors/doris/src/main/java/org/apache/inlong/sort/doris/table/DorisDynamicSchemaOutputFormat.java