GOODBOY008 commented on code in PR #24730:
URL: https://github.com/apache/flink/pull/24730#discussion_r1610997416


##########
flink-formats/flink-csv/src/main/java/org/apache/flink/formats/csv/CsvBulkWriter.java:
##########
@@ -98,16 +108,17 @@ static <T> CsvBulkWriter<T, T, Void> forPojo(Class<T> 
pojoClass, FSDataOutputStr
     @Override
     public void addElement(T element) throws IOException {
         final R r = converter.convert(element, converterContext);
-        csvWriter.writeValue(stream, r);
+        csvWriter.writeValue(generator, r);
     }
 
     @Override
     public void flush() throws IOException {
-        stream.flush();
+        generator.flush();
     }
 
     @Override
     public void finish() throws IOException {
+        generator.close();

Review Comment:
   I will add unit test to verify the desired behavior. 



-- 
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