[Java/Python] in-process vector sharing from Java to Python
- 主要言語
- Java
- スター
- 94
- フォーク
- 152
- 平均マージ
- 3日 16時間
- マージ済み PR(30日)
- 11
説明
Currently we seem to use in all applications of Arrow the IPC capabilities to move data between a Java process and a Python process. While this is 0-serialization, it is not zero-copy. By taking the address and offset, we can already create Python buffers from Java buffers: https://github.com/apache/arrow/pull/1693. This is still a very low-level interface and we should provide the user with:
- A guide on how to load Apache Arrow java libraries in Python (either through a fat-jar that was shipped with Arrow or how he should integrate it into its Java packaging)
- `pyarrow.Array.from_jvm`, `pyarrow.RecordBatch.from_jvm`, … functions that take the respective Java objects and emit Python objects. These Python objects should also ensure that the underlying memory regions are kept alive as long as the Python objects exist.
This issue can also be used as a tracker for the various sub-tasks that will need to be done to complete this rather large milestone.
**Reporter**: [Uwe Korn](https://issues.apache.org/jira/browse/ARROW-2249) / @xhochy
#### Related issues:
- [[Python] Create buffer from address, size and base](https://github.com/apache/arrow/issues/18211) (is blocked by)
- [[Java/Python] Add unit test for pyarrow.timeX types in Array.from_jvm](https://github.com/apache/arrow/issues/44875) (is a parent of)
- [[Java/Python] Add unit test for pyarrow.decimal128 in Array.from_jvm](https://github.com/apache/arrow/issues/44874) (is a parent of)
- [[Java/Python] Support VarCharVector / StringArray in pyarrow.Array.from_jvm](https://github.com/apache/arrow/issues/44873) (is a parent of)
- [[Java/Python] Complex type conversion in pyarrow.Field.from_jvm](https://github.com/apache/arrow/issues/19009) (is a parent of)
- [[Java/Python] Add support for dictionary type to pyarrow.Field.from_jvm](https://github.com/apache/arrow/issues/15719) (is a parent of)
- [[Java/Python] Add pyarrow.{Array,Field}.from_jvm / jvm_buffer](https://github.com/apache/arrow/issues/19008) (is a parent of)
- [[Java] Add method overload for VarCharVector.set(int,String)](https://github.com/apache/arrow/issues/19004) (is related to)
- [[Java] Java implementation of Arrow C data interface](https://github.com/apache/arrow/issues/28685) (is related to)
**Note**: *This issue was originally created as [ARROW-2249](https://issues.apache.org/jira/browse/ARROW-2249). Please see the [migration documentation](https://github.com/apache/arrow/issues/14542) for further details.*
コントリビューションガイド
調査の方向性
提案されているエントリーポイント pyarrow.Array.from_jvm と pyarrow.RecordBatch.from_jvm から始め、pyarrow.Array、Field、jvm_buffer のサポートに関する関連 issue を確認してください。サブタスクを選択する前に、移行ドキュメントとブロックされているバッファ issue を確認してください。完了の条件は、メモリのライフタイムを zero-copy で処理する、Java から Python への定義済みの変換経路があることです。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- java, python
- 領域
- data, distributed-systems
- issue の種類
- 機能追加
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 25/100