Nicholas Roberts created ARROW-14650:
----------------------------------------
Summary: [JS] toArray equivalent to values/values64
Key: ARROW-14650
URL: https://issues.apache.org/jira/browse/ARROW-14650
Project: Apache Arrow
Issue Type: Improvement
Components: JavaScript
Reporter: Nicholas Roberts
As discussed in ARROW-10901, 64 bit integer vectors have values64 getters
available for systems with support for BigInt typed arrays. Column-oriented
dataframe libraries (such as UW's [arquero|https://github.com/uwdata/arquero])
generally use the Chunked::toArray convenience method in favour of directly
dealing with chunks or vectors, and therefore always receive the int32/uint32
data.
I think there are a few alternatives for improving high level access to a 64
bit column's values:
* An optional bit width (or is64Bit, like the <T>::from variants) parameter in
Chunked::toArray, IntVector::toArray.
* A new Chunked::toArray64 method, and the same on IntVector (or at least, the
64 bit variants).
* Use values64 directly in the consuming library (loop over the chunks, copy
into a destination typed array).
The toArray64 option would probably be a bit of a mess (requiring a fallback to
toArray on BaseVector), an optional parameter might be the cleanest approach.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)