[Java/Python] in-process vector sharing from Java to Python
- Langage dominant
- Java
- Étoiles
- 94
- Forks
- 152
- Merge moyen
- 3 j 16 h
- PR mergées (30 j)
- 11
Description
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.*
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Commencez par les points d’entrée proposés pyarrow.Array.from_jvm et pyarrow.RecordBatch.from_jvm, puis examinez l’issue associée concernant la prise en charge de pyarrow.Array, Field et jvm_buffer. Consultez la documentation de migration et l’issue du buffer bloqué avant de choisir une sous-tâche. La tâche est considérée comme terminée lorsqu’un chemin de conversion défini de Java vers Python, avec gestion zero-copy de la durée de vie de la mémoire, est en place.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- java, python
- Domaine
- data, distributed-systems
- Type d'issue
- Fonctionnalité
- Difficulté
- 5/5
- Temps estimé
- Plus d'une semaine
- Activité
- À l'abandon
- Clarté
- À clarifier
- Accessibilité débutants
- 25/100