Hello Everyone,
     Is there a convenient way to combine multiple vectors to one? Assuming
I have two int ValueVector from different location, and I want to expose
only one big StructVector which contains two int ValueVector. Currently I
just read from the two int ValueVector and write to the StructVector(see
the snippet code below). As the two ValueVector has the same length, I want
to avoid the read and write overhead. If we can use the underlying ArrowBuf
of the two ValueVector to construct the StructVector which points the same
ArrowBuf, then we'll have more benefits.
```Java

IntVector vector1 = (IntVector) columnGroupSchema1.getVector(fieldName);

IntVector vector2 = (IntVector) columnGroupSchema2.getVector(fieldName);

StructVector vector =  *new StructVector(...)*;

for (int i = 0; i < vector1.getValueCount(); i++) {
    // use vector's writer to write (i, vector1.get(i));
}

```
    Anyone has some ideas? Thanks all of you.

Arvin

Reply via email to