felipecrv commented on code in PR #36740:
URL: https://github.com/apache/arrow/pull/36740#discussion_r1266856489
##########
cpp/src/arrow/compute/kernels/ree_util_internal.cc:
##########
@@ -79,7 +80,10 @@ Result<std::shared_ptr<ArrayData>> PreallocateValuesArray(
} else {
values_data_buffers = {std::move(validity_buffer),
std::move(values_buffer)};
}
- return ArrayData::Make(value_type, length, std::move(values_data_buffers),
null_count);
+ auto data =
+ ArrayData::Make(value_type, length, std::move(values_data_buffers),
null_count);
+ DCHECK(!has_validity_buffer || data->buffers[0] != NULLPTR);
+ return {std::move(data)};
Review Comment:
I don't really know for sure. `{std::move(data)}` is to make sure I'm
constructing `Result` with an r-value. But I guess it's unnecessary because
`data` is part of a `return` expression.
--
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]