1

I can create an arrow array with a builder:

extern crate arrow;
use arrow::array::Int16Array;

// Create a new builder with a capacity of 100
let mut builder = Int16Array::builder(100);

// Append a slice of primitive values
builder.append_slice(&[2, 3, 4]).unwrap();

// Build the array
let finished_array = builder.finish();

But once I have finished building the array (thus called .finish), is there any option to create a new builder with the data offinished_array without copying the data into a new builder?

What I basically want is a cheap append operation.

1 Answer 1

1

After reading some more, I found out arrow arrays are alway immutable. An append operation to an array is not possible. If you want a zero copy append like behavior, you can write/ use a chunked array (this is not yet available in rust, but for instance is supported in pyarrow

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.