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


##########
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(const 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] = SliceBuffer(array.data()->buffers[i], 1, 2);
+    }
+  }
+  auto sliced_array_data =
+      ArrayData::Make(array.type(), array.length(), std::move(sliced_buffers));

Review Comment:
   Ah, okay, understood. Thanks for letting me know. I have made the change.



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

Reply via email to