romainfrancois commented on a change in pull request #10730:
URL: https://github.com/apache/arrow/pull/10730#discussion_r672314835



##########
File path: r/src/altrep.cpp
##########
@@ -44,25 +49,58 @@ extern "C" {
 #endif
 
 #include <arrow/array.h>
+#include <arrow/util/bitmap_reader.h>
+
+#include "./r_task_group.h"
 
 namespace arrow {
 namespace r {
 
+template <typename T>
+void UseSentinel(const std::shared_ptr<Array>& array) {

Review comment:
       Oh interesting. I guess the advantage of this approach is that, for the 
price of this initial setting of the sentinels, we can then have a `DATAPTR()` 
so access all the data of the array randomly. 
   
   OTOH, we could leave the data untouched and have an `_Elt` that would check 
the null bitmap, and an `GetRegion()` that would also locally use the null 
bitmap. This `GetRegion()` would indeed copy the region data though, so 
potentially be more expensive, even when the region has no nulls. 




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