HuaHuaY commented on code in PR #47524:
URL: https://github.com/apache/arrow/pull/47524#discussion_r2330567917


##########
cpp/src/arrow/csv/options.h:
##########
@@ -188,6 +188,12 @@ struct ARROW_EXPORT WriteOptions {
   /// Whether to write an initial header line with column names
   bool include_header = true;
 
+  /// \brief Quoting style of header
+  ///
+  /// If `quoting_header` is `QuotingStyle::None`, then only write quotes when 
a column
+  /// name contains structural characters. Otherwise, always quote column 
names.
+  QuotingStyle quoting_header = QuotingStyle::AllValid;

Review Comment:
   In the newly added code, `Need` and `AllValid` behave the same. In the old 
code which is used to format csv data instead of csv header, they also behave 
the same for `String` array. The `Need` option means to use different 
`QuotingStyles` for different types. And I think csv headers are always treated 
same as `String`, so the previous default behavior is more like `AllValid` than 
`Needed`.



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