Great!. This sounds good. With Regards, Vibhatha Abeykoon
On Tue, Mar 23, 2021 at 5:38 AM Antoine Pitrou <[email protected]> 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[CScalar] pyarrow_unwrap_scalar(object scalar) > > However, it appears that we forgot to document them. > > Regards > > Antoine. > > > > Le 23/03/2021 à 04:34, Vibhatha Abeykoon a écrit : > > 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 <[email protected]> > > wrote: > > > >> 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 <[email protected]> > wrote: > >> > >>> Hello, > >>> > >>> Is there a way to wrap and unwrap Scalars using the Cython API? > >>> > >>> I am following the docs: > >>> https://arrow.apache.org/docs/python/extending.html > >>> But I couldn't find an option. Not sure if I am following the correct > >> docs. > >>> > >>> With Regards, > >>> Vibhatha Abeykoon, > >>> PhD Candidate | Research Assistant, > >>> Digital Science Center, > >>> Luddy School of Informatics Computing and Engineering, > >>> Indiana University Bloomington, > >>> Cell : +1-812-955-1394 > >>> Web: https://www.vibhatha.org > >>> <https://www.linkedin.com/in/vibhathaabeykoon/> > >>> > >> > > >
