Commits


James Duong authored and GitHub committed 38922eded57
GH-37703: [Java] Method for setting exact number of records in ListVector (#37838) ### Rationale for this change There is currently a setInitialCapacity() function that can be used to set a number of records and density factor when setting the capacity on a ListVector. A developer may want to specify the exact total number of records instead and can use the new methods introduced here. ### What changes are included in this PR? Add setInitialTotalCapacity() to BaseRepeatedVector, ListVector, DensityAwareVector, and LargeListVector to specify the exact total number of records in the backing vector. This is an alternative to using the density argument in setInitialCapacity() that allows the caller to precisely specify the capacity. ### Are these changes tested? Yes. ### Are there any user-facing changes? No. * Closes: #37703 Authored-by: James Duong <duong.james@gmail.com> Signed-off-by: David Li <li.davidm96@gmail.com>