apache / apache/arrow-java

[Java] Memory allocation alignment

Open
#186 5 comments 0 reactions 0 assignees View on GitHub
Type: bug
Dominant language
Java
Stars
94
Forks
152
Avg merge
3d 16h
Merged PRs (30d)
11

Description

### Describe the bug, including details regarding any error messages, version, and platform.

We see memory alignment error when passing arrays allocated using Java arrow to Rust arrow. This is due to strict memory alignment requirement (https://github.com/apache/arrow-rs/issues/4431) at Rust side. I have described the issue there.

So as it looks like it is impossible to access unaligned memory pointers at Rust side. I'm wondering if we could change Java arrow on memory allocation? Could we allocate memory with alignment for arrays in Java arrow so it could be safely sent to other arrow ecosystems?

### Component(s)

Java

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the Java component's memory-allocation path and the linked arrow-rs issue 4431. Determine whether Java Arrow can provide the alignment required for arrays shared with Rust Arrow, and define the allocation behavior and validation needed for the issue to be considered resolved.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
data-engineering
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.