felipecrv commented on code in PR #35036:
URL: https://github.com/apache/arrow/pull/35036#discussion_r1163249103
##########
cpp/src/arrow/util/ree_util.cc:
##########
@@ -47,6 +47,25 @@ int64_t LogicalNullCount(const ArraySpan& span) {
return null_count;
}
+template <typename RunEndCType>
+void SetLogicalNullBits(const ArraySpan& span, uint8_t* out_bitmap, int64_t
out_offset) {
+ const auto& values = ValuesArray(span);
+ const auto& values_bitmap = values.buffers[0].data;
+
+ RunEndEncodedArraySpan<RunEndCType> ree_span(span);
+ auto end = ree_span.end();
+ for (auto it = ree_span.begin(); it != end; ++it) {
+ const bool is_null =
+ values_bitmap &&
Review Comment:
you can early return if `!values_bitmap` outside the loop and remove this
pointer check from the body of the loop completely
--
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]