You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "Jun (JIRA)" <ji...@apache.org> on 2018/02/06 15:44:00 UTC
[jira] [Closed] (ARROW-2091) Interacting with arrow/pyarrow in C++
[ https://issues.apache.org/jira/browse/ARROW-2091?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jun closed ARROW-2091.
----------------------
Resolution: Fixed
Looks like I have all I need. It's just not documented!
> Interacting with arrow/pyarrow in C++
> -------------------------------------
>
> Key: ARROW-2091
> URL: https://issues.apache.org/jira/browse/ARROW-2091
> Project: Apache Arrow
> Issue Type: Improvement
> Reporter: Jun
> Priority: Minor
>
> I've been searching online for a while but cannot figure out how to do this. Please help if this is already a resolved issue.
> I have a c++/python application that interacts with arrow/pyarrow. I want to write a C++ api that takes python objects directly and operate on them in c++.
> {code:java}
> PyObject* process_table(PyObject* table)
> {
> // process the arrow table
> std::shared_ptr<arrow::Table> tablePtr = table; // How?
> }{code}
> The problem here is: how do I extract the internal std::shared_ptr<Table> from the PyObject?
> Unfortunately we are not using cython in our stack, we operate on PyObject * directly in c++.
> I can easily do this on numpy arrays:
> {code:java}
> PyObject * process_array(PyObject* arr)
> {
> PyArray_Check(arr);
> // process the PyArrayObject directly
> ...
> }{code}
> I wonder is there any way to achieve this level of c++ integration without using cython? Thanks!
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)