emkornfield commented on a change in pull request #11849:
URL: https://github.com/apache/arrow/pull/11849#discussion_r763292864
##########
File path: cpp/src/arrow/csv/writer.cc
##########
@@ -72,11 +72,29 @@ RecordBatchIterator RecordBatchSliceIterator(const
RecordBatch& batch,
return RecordBatchIterator(std::move(functor));
}
-// Counts the number of characters that need escaping in s.
-int64_t CountEscapes(util::string_view s) {
+// Counts the number of quotes in s.
+int64_t CountQuotes(util::string_view s) {
return static_cast<int64_t>(std::count(s.begin(), s.end(), '"'));
}
+// Counts the number of CSV structural characters in s.
+int64_t CountStructuralChars(util::string_view s) {
+ int64_t result = 0;
+ for (const auto c : s) {
Review comment:
nit: please spell out type.
--
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]