You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@arrow.apache.org by Kirill Lykov <ly...@gmail.com> on 2020/08/20 16:07:42 UTC

arrow::py::wrap_table returns nullptr

Hi,

I'm trying to bind my C++ code working with arrow::Table.
So my C++ function takes an arrow Table and returns another arrow Table.
In short, if I return the same arrow table as I received as input from
python code, it works.
If I try to return my own arrow table constructed inside the c++ code,
arrow::py::wrap_table returns me 0x0.
Any hint?
I made a gist for the code, if it helps to understand the problem:
https://gist.github.com/KirillLykov/93a7780026dfa90a1b815899e60876f2

-- 
Best regards,
Kirill Lykov

Re: arrow::py::wrap_table returns nullptr

Posted by Antoine Pitrou <an...@python.org>.
Le 20/08/2020 à 18:07, Kirill Lykov a écrit :
> Hi,
> 
> I'm trying to bind my C++ code working with arrow::Table.
> So my C++ function takes an arrow Table and returns another arrow Table.
> In short, if I return the same arrow table as I received as input from
> python code, it works.
> If I try to return my own arrow table constructed inside the c++ code,
> arrow::py::wrap_table returns me 0x0.

If it returns `(PyObject*) nullptr`, it should mean a Python exception
was raised (as per the usual CPython return convention).  You can try
inspecting it using e.g. `PyErr_Print()`.

Regards

Antoine.