Commits


rtadepalli authored and GitHub committed c3eaf4cb290
GH-15187: [Java] Made `reader` initialization lazy and added new `getTransferPair()` function that takes in a `Field` type (#34424) ### Rationale for this change This PR closes #15187. `FieldReader` is being allocated directly in the constructor today, and this PR changes it such that the initialization becomes lazy. Additionally, a new function `getTransferPair(Field, Allocator)` is introduced so that a new `Field` method is not constructed each time `getTransferPair` is called on the Vector. ### What changes are included in this PR? 1. Introduce a new `getTransferPair` method. 2. Make initializing `FieldReader` lazy. ### Are these changes tested? Yes, some tests have been added to verify these changes. ### Are there any user-facing changes? I am not 100% sure if there are any user facing changes. There should not be any breaking changes. * Closes: #15187 Authored-by: Ramasai <ramasai.tadepalli+3108@gmail.com> Signed-off-by: David Li <li.davidm96@gmail.com>