apache / apache/arrow-java

[Java/Python] in-process vector sharing from Java to Python

Đang mở
#420 3 bình luận 0 reaction 0 người được giao Xem trên GitHub
Type: enhancement
Ngôn ngữ chính
Java
Star
94
Fork
152
Merge trung bình
3 ngày 16 giờ
Pull request đã merge (30 ngày)
11

Mô tả

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.*

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Bắt đầu với các điểm vào được đề xuất pyarrow.Array.from_jvm và pyarrow.RecordBatch.from_jvm, sau đó xem lại issue liên quan đến việc hỗ trợ pyarrow.Array, Field và jvm_buffer. Kiểm tra tài liệu migration và issue về buffer đang bị chặn trước khi chọn một sub-task. Hoàn tất yêu cầu có một đường dẫn chuyển đổi được xác định từ Java sang Python cùng với việc quản lý vòng đời bộ nhớ zero-copy.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
java, python
Lĩnh vực
data, distributed-systems
Loại issue
Tính năng
Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Cần làm rõ
Mức phù hợp với người mới
25/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.