dmitry-chirkov-dremio commented on code in PR #54683:
URL: https://github.com/apache/arrow/pull/54683#discussion_r4338228396


##########
cpp/src/arrow/csv/writer.cc:
##########
@@ -512,10 +512,15 @@ class CSVWriterImpl : public ipc::RecordBatchWriter {
       return Status::Invalid("Null string cannot contain quotes.");
     }
 
+    const std::string null_string_value =
+        schema->num_fields() == 1 && options.null_string.empty() &&
+                options.quoting_style != QuotingStyle::None

Review Comment:
   What if we write ["a", null, ""] with all_valid?
   
   AllValid is documented to leave nulls unquoted. This change writes both null 
and the empty string as "", so a reader cannot distinguish them.
   
   Can we add a round-trip test with strings_can_be_null=true, 
quoted_strings_can_be_null=false, and ignore_empty_lines=false, and preserve 
the distinction?



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