How do I convert a vector column to a primitive array column?

How can I convert a Deephaven vector column to a primitive array column in Deephaven?

You can convert a Deephaven vector column to a primitive array column by using the array() method in a selection method's query string. Similarly, the vec() method can convert a primitive array type to a Deephaven vector type. Here, the array method converts an IntVector column to an int[] array. Here's an example:

The vec and array methods can handle the following types:

vec()array()
byte[]ByteVector
char[]CharVector
double[]DoubleVector
float[]FloatVector
int[]IntVector
long[]LongVector
short[]ShortVector

Note

These FAQ pages contain answers to questions about Deephaven Community Core that our users have asked in our Community Slack. If you have a question that is not in our documentation, join our Community and we'll be happy to help!