Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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: 0f2c98e <Eyal Farago-Hagag> ARROW-7837: checkstyle f71b4ee <Eyal Farago-Hagag> ARROW-7837: address comments by @emkornfield fe9bdea <Eyal Farago-Hagag> ARROW-7837: style a16c8fa <Eyal Farago-Hagag> ARROW-7837: introduce to crude benchmarks to setSafe. be2c0b3 <Eyal Farago-Hagag> ARROW-7837: fix typo in comment. d0d9c3e <Eyal Farago-Hagag> ARROW-7837: fix(?) a code style issue. 34cc68f <Eyal Farago-Hagag> ARROW-7837: address comments by @liafan82 f900d2c <Eyal Farago-Hagag> ARROW-7837: fix all handleSafe related call sites. 4e00b29 <Eyal Farago-Hagag> ARROW-7837: fix the issue by forcing handle safe to check the next write position based on 'lastSet'. fe7dc17 <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>
- Loading branch information
1 parent
e92416f
commit 0f36697
Showing
5 changed files
with
89 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters