edponce commented on a change in pull request #11127:
URL: https://github.com/apache/arrow/pull/11127#discussion_r705878505



##########
File path: cpp/src/arrow/compute/kernels/vector_nested.cc
##########
@@ -76,6 +76,24 @@ struct ListParentIndicesArray {
 
   Status Visit(const LargeListType& type) { return VisitList(type); }
 
+  Status Visit(const FixedSizeListType& type) {
+    const int32_t slot_length = type.list_size();
+    const int64_t values_length = slot_length * (input->length - 
input->GetNullCount());
+    ARROW_ASSIGN_OR_RAISE(auto indices, ctx->Allocate(values_length * 
sizeof(int32_t)));
+    int32_t* out_indices = reinterpret_cast<int32_t*>(indices->mutable_data());
+    const uint8_t* bitmap = input->GetValues<uint8_t>(0, 0);
+    for (int32_t i = 0; i < input->length; i++) {
+      if (!bitmap || BitUtil::GetBit(bitmap, input->offset + i)) {
+        std::fill(out_indices, out_indices + slot_length,

Review comment:
       Also, you can batch copies by tracking the number of consecutive valid 
bits, and then perform a `std::fill` when an invalid bit is encountered.




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