You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/09/27 17:56:14 UTC

[GitHub] [arrow] save-buffer commented on a diff in pull request #14225: ARROW-17836: [C++] Allow specifying alignment of buffers

save-buffer commented on code in PR #14225:
URL: https://github.com/apache/arrow/pull/14225#discussion_r981552137


##########
cpp/src/arrow/testing/random.h:
##########
@@ -49,7 +50,9 @@ class ARROW_TESTING_EXPORT RandomArrayGenerator {
   /// \param[in] null_probability the probability of a bit being zero
   ///
   /// \return a generated Buffer
-  std::shared_ptr<Buffer> NullBitmap(int64_t size, double null_probability = 0);
+  std::shared_ptr<Buffer> NullBitmap(int64_t size, double null_probability = 0,
+                                     int64_t alignment = MemoryPool::kDefaultAlignment,
+                                     MemoryPool* memory_pool = NULLPTR);

Review Comment:
   I did want to use these methods to generate test data for the spilling classes in the spilling PR which assume aligned buffers. It would be possible to work around of course, but having this in place makes those tests much more convenient. 



-- 
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