You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Null values are not guaranteed to be 0. We use a separate bitmask validity vector to determine if an element is null or not. If an element is null then it's value is undefined and could be anything.
However, creating spans from buffers is fine.
Those spans will not keep the buffer alive though. So you need to avoid something like this:
Also, that reinterpret cast is only valid if m_array->data()->buffers[1]->data() is 8-byte aligned. This is true for any buffer allocated by Arrow-C++ and is supposed to be true for any buffer sent over IPC but it is not currently guaranteed for buffers received over Flight due to #32276.
Describe the usage question you have. Please include as many useful details as possible.
I recently have been accessing const raw data from ArrayData holding doubles. by doing the following
auto ptr = reinterpret_cast<const double*>(m_array->data()->buffers[1]->data()) + m_array->offset();
std::span view(ptr, m_array->length);
i found when null values exist they are 0; which is fine for my application. but are they are any other thing i should be thinking of.
Component(s)
C++
The text was updated successfully, but these errors were encountered: