You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "felipecrv (via GitHub)" <gi...@apache.org> on 2023/07/04 17:58:33 UTC

[GitHub] [arrow] felipecrv commented on a diff in pull request #36461: GH-36327: [C++][CI] Fix Valgrind failures

felipecrv commented on code in PR #36461:
URL: https://github.com/apache/arrow/pull/36461#discussion_r1252265963


##########
cpp/src/arrow/compute/kernels/ree_util_internal.cc:
##########
@@ -62,7 +63,7 @@ Result<std::shared_ptr<ArrayData>> PreallocateValuesArray(
   std::vector<std::shared_ptr<Buffer>> values_data_buffers;
   std::shared_ptr<Buffer> validity_buffer = NULLPTR;
   if (has_validity_buffer) {
-    ARROW_ASSIGN_OR_RAISE(validity_buffer, AllocateBitmap(length, pool));
+    ARROW_ASSIGN_OR_RAISE(validity_buffer, AllocateEmptyBitmap(length, pool));

Review Comment:
   Do we have to pay the cost of initializing the buffers even though every value will be overwritten by the code that uses this buffer?



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org