robobario commented on code in PR #24730: URL: https://github.com/apache/flink/pull/24730#discussion_r1610925700
########## 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: The CsvGenerator [honours AUTO_CLOSE_TARGET](https://github.com/FasterXML/jackson-dataformats-text/blob/3d3165e58b90618a5fbccf630f1604a383afe78c/csv/src/main/java/com/fasterxml/jackson/dataformat/csv/CsvGenerator.java#L504) so generator.close() will flush the underlying `Writer` but not close it. It would be great to have unit tests proving this. -- 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: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org