-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Fix importing long decimal vector from Arrow (#11404)
Summary: When integrating Spark query runner with Spark expression fuzzer test, we found it cored dumps at below point when copying a decimal vector, whose memory is allocated by 'arrow::ipc::RecordBatchReader'. https://github.com/facebookincubator/velox/blob/7b2bb7f672b435d38d5a83f9cd8441bf17b564e6/velox/vector/FlatVector-inl.h#L198 The reason is Arrow uses two uint64_t values to represent a 128-bit decimal value, and the allocated memory might not be 16-byte aligned.This PR adds a copy process for long decimal in 'importFromArrowImpl' to ensure the alignment. #2388 Pull Request resolved: #11404 Reviewed By: pedroerp Differential Revision: D66307435 Pulled By: kagamiori fbshipit-source-id: 86081c041169cfc196e68f36629a246f8626d3d9
- Loading branch information
1 parent
ebfb1e5
commit df3266c
Showing
3 changed files
with
51 additions
and
0 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