sanjibansg commented on code in PR #14758:
URL: https://github.com/apache/arrow/pull/14758#discussion_r1147782486


##########
cpp/src/arrow/util/align_util_test.cc:
##########
@@ -59,6 +63,18 @@ void CheckBitmapWordAlign(const uint8_t* data, int64_t 
bit_offset, int64_t lengt
   }
 }
 
+arrow::Result<std::shared_ptr<Array>> 
CreateUnalignedArray(std::shared_ptr<Array> array) {
+  BufferVector sliced_buffers(array->data()->buffers.size(), nullptr);
+  for (std::size_t i = 0; i < array->data()->buffers.size(); ++i) {
+    if (array->data()->buffers[i]) {
+      sliced_buffers[i] = array->data()->buffers[i]->CopySlice(0, 
2).MoveValueUnsafe();

Review Comment:
   made the change, thanks for the suggestion.



-- 
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-unsubscr...@arrow.apache.org

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

Reply via email to