cyb70289 commented on a change in pull request #12504:
URL: https://github.com/apache/arrow/pull/12504#discussion_r813500124



##########
File path: cpp/src/arrow/csv/writer.cc
##########
@@ -170,11 +178,17 @@ class UnquotedColumnPopulator : public ColumnPopulator {
       RETURN_NOT_OK(CheckStringArrayHasNoStructuralChars(*casted_array_, 
delimiter_));
     }
 
-    for (int x = 0; x < casted_array_->length(); x++) {
-      row_lengths[x] += casted_array_->IsNull(x)
-                            ? static_cast<int32_t>(null_string_->size())
-                            : casted_array_->value_length(x);
-    }

Review comment:
       `VisistArrayDataInline` processes continuous non-null / null blocks in 
batch and performs better than this bit by bit checking, though looks doing 
more work (extracts the string_view but only string length is 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