Commits


Eyal Farago-Hagag authored and Micah Kornfield committed 0f36697763a
ARROW-7837 [JAVA] copyFromSafe fails due to a bug in handleSafe this fixes [ARROW-7837](https://issues.apache.org/jira/browse/ARROW-7837). * introduces a small test case showing how `copyFromSafe` fails on index-out-of-bounds when skipping some indices when adding values to a `VarCharVector` (probably happens to `VarBinaryVector` as well). * root cause is a bug in `handleSafe` which loads a stale write index resulting with a failure to identify the need to resize the value buffer. * fixed `handleSafe` to consult with the last-set index in order to properly calculate the future end offset of writing requested length to the buffer. Closes #6461 from eyalfa/ARROW-7837 and squashes the following commits: 0f2c98ea4 <Eyal Farago-Hagag> ARROW-7837: checkstyle f71b4ee6d <Eyal Farago-Hagag> ARROW-7837: address comments by @emkornfield fe9bdea15 <Eyal Farago-Hagag> ARROW-7837: style a16c8fa3b <Eyal Farago-Hagag> ARROW-7837: introduce to crude benchmarks to setSafe. be2c0b3c9 <Eyal Farago-Hagag> ARROW-7837: fix typo in comment. d0d9c3ea0 <Eyal Farago-Hagag> ARROW-7837: fix(?) a code style issue. 34cc68fa6 <Eyal Farago-Hagag> ARROW-7837: address comments by @liafan82 f900d2c66 <Eyal Farago-Hagag> ARROW-7837: fix all handleSafe related call sites. 4e00b299f <Eyal Farago-Hagag> ARROW-7837: fix the issue by forcing handle safe to check the next write position based on 'lastSet'. fe7dc1793 <Eyal Farago-Hagag> ARROW-7837: reproduce ARROW-7837 in a unit-test. Authored-by: Eyal Farago-Hagag <efarago@salesforce.com> Signed-off-by: Micah Kornfield <emkornfield@gmail.com>