Apache Arrow (C++)
A columnar in-memory analytics layer designed to accelerate big data.
Public Member Functions | Static Public Member Functions | List of all members
arrow::ipc::RecordBatchStreamReader Class Reference

Synchronous batch stream reader that reads from io::InputStream. More...

#include <arrow/ipc/reader.h>

Inheritance diagram for arrow::ipc::RecordBatchStreamReader:
arrow::RecordBatchReader

Public Member Functions

virtual ~RecordBatchStreamReader ()
 
std::shared_ptr< Schemaschema () const override
 Returns the schema read from the stream. More...
 
Status ReadNext (std::shared_ptr< RecordBatch > *batch) override
 Read the next record batch in the stream. More...
 
- Public Member Functions inherited from arrow::RecordBatchReader
virtual ~RecordBatchReader ()
 

Static Public Member Functions

static Status Open (std::unique_ptr< MessageReader > message_reader, std::shared_ptr< RecordBatchReader > *out)
 Create batch reader from generic MessageReader. More...
 
static Status Open (io::InputStream *stream, std::shared_ptr< RecordBatchReader > *out)
 Record batch stream reader from InputStream. More...
 
static Status Open (const std::shared_ptr< io::InputStream > &stream, std::shared_ptr< RecordBatchReader > *out)
 Open stream and retain ownership of stream object. More...
 

Detailed Description

Synchronous batch stream reader that reads from io::InputStream.

This class reads the schema (plus any dictionaries) as the first messages in the stream, followed by record batches. For more granular zero-copy reads see the ReadRecordBatch functions

Constructor & Destructor Documentation

◆ ~RecordBatchStreamReader()

virtual arrow::ipc::RecordBatchStreamReader::~RecordBatchStreamReader ( )
virtual

Member Function Documentation

◆ Open() [1/3]

static Status arrow::ipc::RecordBatchStreamReader::Open ( std::unique_ptr< MessageReader message_reader,
std::shared_ptr< RecordBatchReader > *  out 
)
static

Create batch reader from generic MessageReader.

Parameters
[in]message_readera MessageReader implementation
[out]outthe created RecordBatchReader object
Returns
Status

◆ Open() [2/3]

static Status arrow::ipc::RecordBatchStreamReader::Open ( io::InputStream stream,
std::shared_ptr< RecordBatchReader > *  out 
)
static

Record batch stream reader from InputStream.

Parameters
[in]streaman input stream instance. Must stay alive throughout lifetime of stream reader
[out]outthe created RecordBatchStreamReader object
Returns
Status

◆ Open() [3/3]

static Status arrow::ipc::RecordBatchStreamReader::Open ( const std::shared_ptr< io::InputStream > &  stream,
std::shared_ptr< RecordBatchReader > *  out 
)
static

Open stream and retain ownership of stream object.

Parameters
[in]streamthe input stream
[out]outthe batch reader
Returns
Status

◆ ReadNext()

Status arrow::ipc::RecordBatchStreamReader::ReadNext ( std::shared_ptr< RecordBatch > *  batch)
overridevirtual

Read the next record batch in the stream.

Return null for batch when reaching end of stream

Parameters
[out]batchthe next loaded batch, null at end of stream
Returns
Status

Implements arrow::RecordBatchReader.

◆ schema()

std::shared_ptr<Schema> arrow::ipc::RecordBatchStreamReader::schema ( ) const
overridevirtual

Returns the schema read from the stream.

Implements arrow::RecordBatchReader.


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