Re: Wrap Unwarp Scalars in Cython API

2021-03-24 Thread Vibhatha Abeykoon
Great!. This sounds good. With Regards, Vibhatha Abeykoon On Tue, Mar 23, 2021 at 5:38 AM Antoine Pitrou wrote: > > Hi Vibhatha, > > The APIs exist and are declared (in Cython) as: > > cdef public object pyarrow_wrap_scalar(const shared_ptr[CScalar]& > sp_scalar) > cdef public shared_ptr[CScal

Re: Wrap Unwarp Scalars in Cython API

2021-03-23 Thread Antoine Pitrou
Hi Vibhatha, The APIs exist and are declared (in Cython) as: cdef public object pyarrow_wrap_scalar(const shared_ptr[CScalar]& sp_scalar) cdef public shared_ptr[CScalar] pyarrow_unwrap_scalar(object scalar) However, it appears that we forgot to document them. Regards Antoine. Le 23/03/20

Re: Wrap Unwarp Scalars in Cython API

2021-03-22 Thread Vibhatha Abeykoon
The use case is to pass a Scalar created in Python to a kernel written in C++ backend which supports arrow data types. To support this I need to unwrap the Pyarrow Scalar to a C++ arrow Scalar. With Regards, Vibhatha Abeykoon On Mon, Mar 22, 2021 at 11:15 PM Benjamin Kietzman wrote: > I'm not

Re: Wrap Unwarp Scalars in Cython API

2021-03-22 Thread Benjamin Kietzman
I'm not sure what kind of unwrapping you are looking for, would pyarrow.scalar and Scalar.as_py address your use case? For example, pa.scalar(128) will wrap that integer into a Scalar On Mon, Mar 22, 2021, 11:15 Vibhatha Abeykoon wrote: > Hello, > > Is there a way to wrap and unwrap Scalars usin