private Pool<T[]> createPoolOfBatches(int numBatches) {
        Pool<T[]> poolOfBatches = new Pool<>(numBatches);
        for (int batchId = 0; batchId < numBatches; batchId++) {
            T[] batch = recordFactory.createBatch(batchSize);
            poolOfBatches.add(batch);
        }

        return poolOfBatches;
    }
This implementation stores record batch in array from recyclable pool

Copy from iceberg-flink:iceberg-flink-1.15:1.3.1
inlong-sort/sort-flink/sort-flink-v1.15/sort-connectors/iceberg/src/main/java/org/apache/inlong/sort/iceberg/source/reader/ArrayPoolDataIteratorBatcher.java