As part a PR Ji Liu has made to help populate data for test cases [1], the
question came up on whether we should provide a more  builder classes in
java for ValueVectors.  The proposed implementation would wrap the existing
Writer classes.

Do people think this would be a valuable addition to the java library? I
imagine it would be a builder per ValueVectorType.  The main benefit I see
to this is making the library potentially slightly easier to use for
new-comers, but might not be the most efficient.  A straw-man interface is
listed below.

Thoughts?

Thanks,
Micah

class IntVectorBuilder {
   public IntVectorBuilder(BufferAllocator allocator);

   IntVectorBuilder add(int value);
    IntVectorBuilder addAll(int[] values);
    IntVectorBuilder addNull();
    // handles null values in array
    IntVectorBuilder addAll(Integer... values);
    IntVectorBuilder addAll(List<Integer> values);
    IntVector build(String name);
}

Reply via email to