Apache Arrow (C++)
A columnar in-memory analytics layer designed to accelerate big data.
Public Member Functions | Public Attributes | List of all members
arrow::py::SerializedPyObject Struct Reference

#include <arrow/python/python_to_arrow.h>

Public Member Functions

Status WriteTo (io::OutputStream *dst)
 Write serialized Python object to OutputStream. More...
 
Status GetComponents (MemoryPool *pool, PyObject **out)
 Convert SerializedPyObject to a dict containing the message components as Buffer instances with minimal memory allocation. More...
 

Public Attributes

std::shared_ptr< RecordBatchbatch
 
std::vector< std::shared_ptr< Tensor > > tensors
 
std::vector< std::shared_ptr< Buffer > > buffers
 

Member Function Documentation

◆ GetComponents()

Status arrow::py::SerializedPyObject::GetComponents ( MemoryPool pool,
PyObject **  out 
)

Convert SerializedPyObject to a dict containing the message components as Buffer instances with minimal memory allocation.

{ 'num_tensors': N, 'num_buffers': K, 'data': [Buffer] }

Each tensor is written as two buffers, one for the metadata and one for the body. Therefore, the number of buffers in 'data' is 2 * N + K + 1, with the first buffer containing the serialized record batch containing the UnionArray that describes the whole object

◆ WriteTo()

Status arrow::py::SerializedPyObject::WriteTo ( io::OutputStream dst)

Write serialized Python object to OutputStream.

Parameters
[in,out]dstan OutputStream
Returns
Status

Member Data Documentation

◆ batch

std::shared_ptr<RecordBatch> arrow::py::SerializedPyObject::batch

◆ buffers

std::vector<std::shared_ptr<Buffer> > arrow::py::SerializedPyObject::buffers

◆ tensors

std::vector<std::shared_ptr<Tensor> > arrow::py::SerializedPyObject::tensors

The documentation for this struct was generated from the following file: