pitrou commented on code in PR #36461:
URL: https://github.com/apache/arrow/pull/36461#discussion_r1252269362
##########
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:
We do this in other places already. Initializing a buffer that's just been
allocated (and that will be accessed just after) should be reasonably cheap.
I would welcome another solution, but we don't want to disable the Valgrid
checks as they're important.
##########
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:
We do this in other places already. Initializing a buffer that's just been
allocated (and that will be accessed just after) should be reasonably cheap.
I would welcome another solution, but we don't want to disable the Valgrind
checks as they're important.
--
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]