paul-rogers commented on a change in pull request #1873: DRILL-6096: Provide 
mechanism to configure text writer configuration
URL: https://github.com/apache/drill/pull/1873#discussion_r336790447
 
 

 ##########
 File path: 
exec/java-exec/src/main/java/org/apache/drill/exec/store/easy/text/writer/TextRecordWriter.java
 ##########
 @@ -165,10 +182,12 @@ public void writeField() throws IOException {
   @Override
   public void cleanup() throws IOException {
     super.cleanup();
-    if (stream != null) {
-      stream.close();
-      stream = null;
-      logger.debug("closing file");
+
+    fRecordStarted = false;
+    if (writer != null) {
+      writer.close();
 
 Review comment:
   This is a writer. The close can fail with an exception. If it does, the 
entire operation should fail. Should we throw a UserException` with the details 
here rather than let the `IOException` bubble up?`

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to