damondouglas commented on code in PR #31920:
URL: https://github.com/apache/beam/pull/31920#discussion_r1681554507


##########
sdks/java/io/csv/src/main/java/org/apache/beam/sdk/io/csv/CsvIOStringToCsvRecord.java:
##########
@@ -44,18 +46,27 @@ final class CsvIOStringToCsvRecord
    * to Row or custom type.
    */
   @Override
-  public PCollection<Iterable<String>> expand(PCollection<String> input) {
+  public PCollection<List<String>> expand(PCollection<String> input) {
     return input.apply(ParDo.of(new ProcessLineToRecordFn()));
   }
 
   /** Processes each line in order to convert it to a {@link CSVRecord}. */
-  private class ProcessLineToRecordFn extends DoFn<String, Iterable<String>> {
+  private class ProcessLineToRecordFn extends DoFn<String, List<String>> {
     @ProcessElement
-    public void process(@Element String line, OutputReceiver<Iterable<String>> 
receiver)
+    public void process(@Element String line, OutputReceiver<List<String>> 
receiver)
         throws IOException {
       for (CSVRecord record : CSVParser.parse(line, csvFormat).getRecords()) {
-        receiver.output(record);
+        receiver.output(csvRecordtoList(record));
       }
     }
   }
+
+  /** Creates a {@link List<String>} containing {@link CSVRecord} values. */
+  private List<String> csvRecordtoList(CSVRecord record) {

Review Comment:
   You can make this private static.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to