felipecrv commented on code in PR #37792:
URL: https://github.com/apache/arrow/pull/37792#discussion_r1334700071


##########
cpp/src/arrow/array/array_binary.cc:
##########
@@ -90,33 +90,33 @@ LargeStringArray::LargeStringArray(int64_t length,
 
 Status LargeStringArray::ValidateUTF8() const { return 
internal::ValidateUTF8(*data_); }
 
-BinaryViewArray::BinaryViewArray(const std::shared_ptr<ArrayData>& data) {
+BinaryViewArray::BinaryViewArray(std::shared_ptr<ArrayData> data) {
   ARROW_CHECK_EQ(data->type->id(), Type::BINARY_VIEW);
-  SetData(data);
+  SetData(std::move(data));
 }
 
-BinaryViewArray::BinaryViewArray(int64_t length, std::shared_ptr<Buffer> views,
-                                 BufferVector data_buffers,
+BinaryViewArray::BinaryViewArray(std::shared_ptr<DataType> type, int64_t 
length,
+                                 std::shared_ptr<Buffer> views, BufferVector 
buffers,
                                  std::shared_ptr<Buffer> null_bitmap, int64_t 
null_count,
-                                 int64_t offset)
-    : PrimitiveArray(binary_view(), length, std::move(views), 
std::move(null_bitmap),
-                     null_count, offset) {
-  data_->buffers.resize(data_buffers.size() + 2);
-  std::move(data_buffers.begin(), data_buffers.end(), data_->buffers.begin() + 
2);
+                                 int64_t offset) {
+  buffers.insert(buffers.begin(), std::move(views));

Review Comment:
   my C++ knowledge is not enough to understand this line. Don't we need an 
`.end()` somewhere?



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