AlenkaF commented on code in PR #41757:
URL: https://github.com/apache/arrow/pull/41757#discussion_r1625754810
##########
cpp/src/arrow/array/array_nested.cc:
##########
@@ -836,24 +845,32 @@ Result<std::shared_ptr<Array>>
MapArray::FromArraysInternal(
using OffsetArrayType = typename TypeTraits<OffsetArrowType>::ArrayType;
const auto& typed_offsets = checked_cast<const OffsetArrayType&>(*offsets);
- auto buffers = BufferVector({nullptr, typed_offsets.values()});
+
+ BufferVector buffers;
+ int64_t null_count;
+ if (null_bitmap != nullptr) {
+ buffers = BufferVector({std::move(null_bitmap), typed_offsets.values()});
+ null_count = null_bitmap->size();
+ } else {
+ buffers = BufferVector({null_bitmap, typed_offsets.values()});
Review Comment:
Done here:
https://github.com/apache/arrow/pull/41956/commits/9afb881d888b8313e82dda20b83d5aa93c3be812
##########
cpp/src/arrow/array/array_nested.cc:
##########
@@ -836,24 +845,32 @@ Result<std::shared_ptr<Array>>
MapArray::FromArraysInternal(
using OffsetArrayType = typename TypeTraits<OffsetArrowType>::ArrayType;
const auto& typed_offsets = checked_cast<const OffsetArrayType&>(*offsets);
- auto buffers = BufferVector({nullptr, typed_offsets.values()});
+
+ BufferVector buffers;
+ int64_t null_count;
+ if (null_bitmap != nullptr) {
+ buffers = BufferVector({std::move(null_bitmap), typed_offsets.values()});
+ null_count = null_bitmap->size();
Review Comment:
Done here:
https://github.com/apache/arrow/pull/41956/commits/043a8ee9ef4e8e2e2a405d27053d83776b3522d0
--
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]