class CSVSparkTransform {

    public BatchCSVRecord transform(BatchCSVRecord batch) {
        BatchCSVRecord batchCSVRecord = new BatchCSVRecord();
        List<List<Writable>> converted =  execute(toArrowWritables(toArrowColumnsString(
                bufferAllocator,transformProcess.getInitialSchema(),
                batch.getRecordsAsString()),
                transformProcess.getInitialSchema()),transformProcess);
        int numCols = converted.get(0).size();
        for (int row = 0; row < converted.size(); row++) {
            String[] values = new String[numCols];
            for (int i = 0; i < values.length; i++)
                values[i] = converted.get(row).get(i).toString();
            batchCSVRecord.add(new SingleCSVRecord(values));
        }

        return batchCSVRecord;

    }

}