@Test
public void testVectorFor() {

    BufferAllocator allocator = new RootAllocator(Long.MAX_VALUE);
    val vector = ArrowConverter.vectorFor(allocator,"field1",new float[]{1,2,3});
    assertEquals(3,vector.getValueCount());
    assertEquals(1,vector.get(0),1e-2);
    assertEquals(2,vector.get(1),1e-2);
    assertEquals(3,vector.get(2),1e-2);
    val vectorLong = ArrowConverter.vectorFor(allocator,"field1",new long[]{1,2,3});
    assertEquals(3,vectorLong.getValueCount());
    assertEquals(1,vectorLong.get(0),1e-2);
    assertEquals(2,vectorLong.get(1),1e-2);
    assertEquals(3,vectorLong.get(2),1e-2);
    val vectorInt = ArrowConverter.vectorFor(allocator,"field1",new int[]{1,2,3});
    assertEquals(3,vectorInt.getValueCount());
    assertEquals(1,vectorInt.get(0),1e-2);
    assertEquals(2,vectorInt.get(1),1e-2);
    assertEquals(3,vectorInt.get(2),1e-2);
    val vectorDouble = ArrowConverter.vectorFor(allocator,"field1",new double[]{1,2,3});
    assertEquals(3,vectorDouble.getValueCount());
    assertEquals(1,vectorDouble.get(0),1e-2);
    assertEquals(2,vectorDouble.get(1),1e-2);
    assertEquals(3,vectorDouble.get(2),1e-2);
    val vectorBool = ArrowConverter.vectorFor(allocator,"field1",new boolean[]{true,true,false});
    assertEquals(3,vectorBool.getValueCount());
    assertEquals(1,vectorBool.get(0),1e-2);
    assertEquals(1,vectorBool.get(1),1e-2);
    assertEquals(0,vectorBool.get(2),1e-2);
}