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/05 16:13:00 UTC
[jira] [Created] (ARROW-2091) Interacting with arrow/pyarrow in C++
Jun created ARROW-2091:
--------------------------
Summary: 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
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)