Usually we use UnionListWriter to write to ListVector in Arrow Java API. But I didn't find there is an API like writeBoolean in UnionListWriter. So How can we write Boolean value to a List in Arrow?
Usually we use UnionListWriter to write to ListVector in Arrow Java API. But I didn't find there is an API like writeBoolean in UnionListWriter. So How can we write Boolean value to a List in Arrow?
You can write a boolean as an integer with 0 standing for false. For a list of booleans, I think the best approach might be to use UnionListWriter#writeBit();
@Override
public void writeBit(int value) {
writer.writeBit(value);
writer.setPosition(writer.idx()+1);
}