kevingurney commented on code in PR #35655:
URL: https://github.com/apache/arrow/pull/35655#discussion_r1205840940


##########
matlab/src/cpp/arrow/matlab/array/proxy/numeric_array.h:
##########
@@ -26,11 +26,19 @@
 #include "arrow/type_traits.h"
 
 #include "arrow/matlab/array/proxy/array.h"
+#include "arrow/matlab/bit/bit_pack_matlab_logical_array.h"
 
 #include "libmexclass/proxy/Proxy.h"
 
 namespace arrow::matlab::array::proxy {
 
+namespace {
+const uint8_t* getUnpackedValidityBitmap(const 
::matlab::data::TypedArray<bool>& valid_elements) {
+    const auto valid_elements_iterator(valid_elements.cbegin());
+    return reinterpret_cast<const 
uint8_t*>(valid_elements_iterator.operator->());

Review Comment:
   Unfortunately, the current design of the MATLAB Data APIs doesn't provide an 
easier way of extracting the raw data without making a copy. The `operator->()` 
syntax is the only way to achieve this at the moment.
   
   We know this isn't a great solution, and we have reached out to the relevant 
product teams at MathWorks to see if we can come up with a better solution for 
a future MATLAB release.



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