feat: Introduce writeBatchFfi in Java JNI to avoid IPC serialization overhead#7205
Merged
robert3005 merged 1 commit intovortex-data:developfrom Mar 31, 2026
Merged
Conversation
f8a01e1 to
23712e6
Compare
Contributor
|
We fixed the wasm-integration check earlier today, I think you can pull latest from the develop branch and should fix it |
robert3005
approved these changes
Mar 30, 2026
Contributor
robert3005
left a comment
There was a problem hiding this comment.
I think this is in the direction of the apis we need. We will also need to add writing arrow recordbatch stream
…overhead Signed-off-by: JingsongLi <jingsonglee0@gmail.com>
23712e6 to
da5b743
Compare
Contributor
Author
|
Thanks @a10y @robert3005 for your feedback. Rebased and force pushed. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes: #7204
Currently writeBatch accepts Arrow IPC serialized bytes (byte[]), which requires serialization/deserialization overhead. We wants a writeBatchFfi path that directly accepts raw Arrow C Data Interface pointers (arrow_array_addr and arrow_schema_addr), avoiding the IPC round-trip.
We have conducted some internal tests, and the cost of serialization may reach 20% of the cost of writing.
(From Apache Paimom community)
Testing
JNIWriterTest