Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A new feature as a workaround hack to unavailable offset support in Arrow Java #5959

Closed
viirya opened this issue Jun 25, 2024 · 1 comment · Fixed by #5964
Closed

A new feature as a workaround hack to unavailable offset support in Arrow Java #5959

viirya opened this issue Jun 25, 2024 · 1 comment · Fixed by #5964
Labels
arrow Changes to the arrow crate enhancement Any new improvement worthy of a entry in the changelog

Comments

@viirya
Copy link
Member

viirya commented Jun 25, 2024

Is your feature request related to a problem or challenge? Please describe what you are trying to do.

For offset-ed offset buffer of variable-sized binary array, the valid FFI output is to record the offset buffer's offset into FFI's offset field and expose the beginning of the buffer as the pointer. So the consumer can calculate correctly the length of data buffer.

However, due to Arrow Java's issue: apache/arrow#42156, Arrow Java does not support offset field in the FFI output. It causes no sliced binary array can be passed between arrow-rs and Arrow Java.

To workaround this issue, we have to enforce offset-ed offset buffer to be exposed at the sliced buffer's beginning. When calculating the length of data buffer, we assume the first element of the offset buffer is always 0 (this is how Arrow Java and arrow-rs do).

This is a hacky solution and should be removed once Arrow Java supports offset field in the FFI output.

Describe the solution you'd like

Describe alternatives you've considered

Additional context

@viirya viirya added the enhancement Any new improvement worthy of a entry in the changelog label Jun 25, 2024
@alamb alamb added the arrow Changes to the arrow crate label Jul 2, 2024
@alamb
Copy link
Contributor

alamb commented Jul 2, 2024

label_issue.py automatically added labels {'arrow'} from #5964

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arrow Changes to the arrow crate enhancement Any new improvement worthy of a entry in the changelog
Projects
None yet
2 participants