afedulov commented on code in PR #24730:
URL: https://github.com/apache/flink/pull/24730#discussion_r1610487523
##########
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:
Hmm, I am not sure this is safe, see:
https://github.com/apache/flink/blob/master/flink-core/src/main/java/org/apache/flink/api/common/serialization/BulkWriter.java#L69-L70
--
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]