rynewang commented on code in PR #48718:
URL: https://github.com/apache/arrow/pull/48718#discussion_r2685026850


##########
cpp/src/arrow/csv/writer.cc:
##########
@@ -590,6 +590,13 @@ class CSVWriterImpl : public ipc::RecordBatchWriter {
     return Status::OK();
   }
 
+  // GH-36889: Write buffer to sink and clear it to avoid stale content
+  // being written again if the next batch is empty.
+  Status WriteAndClearBuffer() {

Review Comment:
   done



##########
python/pyarrow/tests/test_csv.py:
##########
@@ -2065,3 +2065,36 @@ def readinto(self, *args):
     for i in range(20):
         with pytest.raises(pa.ArrowInvalid):
             read_csv(MyBytesIO(data))
+
+
+def test_write_csv_empty_batch_no_duplicate_header():

Review Comment:
   done



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