Same as title: is toArray() a zero-copy memory cast, in effect? Is there a way to find out this sort of things without asking on forums? Thanks.
Asked
Active
Viewed 153 times
1 Answers
0
Apache arrow supports a number of different languages and I don't see any language tag here. I'm going to assume JavaScript because that is the only language that has a toArray
method on something called a Vector
. If it is not JavaScript then please let me know.
The answer to your question is maybe. If it is a vector of int, float, time, decimal, or timestamp then it will be zero-copy and it is just returning a window into a private variable in the vector.
Otherwise, if it is a different type, then it performs an actual memory copy.
There is also an arrow user's mailing list user@arrow.apache.org which is probably the place to ask this kind of question for the fastest answer.

Pace
- 41,875
- 13
- 113
- 156