Skip to content

feat: Introduce writeBatchFfi in Java JNI to avoid IPC serialization overhead#7205

Merged
robert3005 merged 1 commit intovortex-data:developfrom
JingsongLi:writeBatchFfi
Mar 31, 2026
Merged

feat: Introduce writeBatchFfi in Java JNI to avoid IPC serialization overhead#7205
robert3005 merged 1 commit intovortex-data:developfrom
JingsongLi:writeBatchFfi

Conversation

@JingsongLi
Copy link
Copy Markdown
Contributor

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

@JingsongLi JingsongLi force-pushed the writeBatchFfi branch 2 times, most recently from f8a01e1 to 23712e6 Compare March 30, 2026 02:20
@a10y
Copy link
Copy Markdown
Contributor

a10y commented Mar 30, 2026

We fixed the wasm-integration check earlier today, I think you can pull latest from the develop branch and should fix it

@a10y a10y added the changelog/performance A performance improvement label Mar 30, 2026
Copy link
Copy Markdown
Contributor

@robert3005 robert3005 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>
@JingsongLi
Copy link
Copy Markdown
Contributor Author

Thanks @a10y @robert3005 for your feedback. Rebased and force pushed.

@robert3005 robert3005 merged commit 65a8185 into vortex-data:develop Mar 31, 2026
58 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog/performance A performance improvement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants