Describe the enhancement requested
[Java] Allocate the FieldReader for Arrow Vectors only on demand. Also introduce getTransferPair which takes Field as parameter.
-
FieldReader objects are created in the constructor of arrow vectors. FieldReader objects might not be needed in all cases. So create them only if required. https://github.com/apache/arrow/blob/master/java/vector/src/main/java/org/apache/arrow/vector/BitVector.java#L83
-
Introduce a new getTransferPair method which takes 'Field' as a parameter. In some cases its useful to pass a 'Field' object directly and not create a new 'Field' everytime. https://github.com/apache/arrow/blob/master/java/vector/src/main/java/org/apache/arrow/vector/BitVector.java#L553
Component(s)
Java