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::JsonReader Class Reference

Read the JSON representation of an Arrow record batch file or stream. More...

#include <arrow/ipc/json.h>

Public Member Functions

 ~JsonReader ()
 
std::shared_ptr< Schemaschema () const
 Return the schema read from the JSON. More...
 
int num_record_batches () const
 Return the number of record batches. More...
 
Status ReadRecordBatch (int i, std::shared_ptr< RecordBatch > *batch) const
 Read a particular record batch from the file. More...
 

Static Public Member Functions

static Status Open (MemoryPool *pool, const std::shared_ptr< Buffer > &data, std::unique_ptr< JsonReader > *reader)
 Create a new JSON reader. More...
 
static Status Open (const std::shared_ptr< Buffer > &data, std::unique_ptr< JsonReader > *reader)
 Create a new JSON reader that uses the default memory pool. More...
 

Detailed Description

Read the JSON representation of an Arrow record batch file or stream.

This is used for integration testing

Constructor & Destructor Documentation

◆ ~JsonReader()

arrow::ipc::JsonReader::~JsonReader ( )

Member Function Documentation

◆ num_record_batches()

int arrow::ipc::JsonReader::num_record_batches ( ) const

Return the number of record batches.

◆ Open() [1/2]

static Status arrow::ipc::JsonReader::Open ( MemoryPool pool,
const std::shared_ptr< Buffer > &  data,
std::unique_ptr< JsonReader > *  reader 
)
static

Create a new JSON reader.

Parameters
[in]poola MemoryPool to use for buffer allocations
[in]dataa Buffer containing the JSON data
[out]readerthe returned reader object
Returns
Status

◆ Open() [2/2]

static Status arrow::ipc::JsonReader::Open ( const std::shared_ptr< Buffer > &  data,
std::unique_ptr< JsonReader > *  reader 
)
static

Create a new JSON reader that uses the default memory pool.

Parameters
[in]dataa Buffer containing the JSON data
[out]readerthe returned reader object
Returns
Status

◆ ReadRecordBatch()

Status arrow::ipc::JsonReader::ReadRecordBatch ( int  i,
std::shared_ptr< RecordBatch > *  batch 
) const

Read a particular record batch from the file.

Parameters
[in]ithe record batch index, does not boundscheck
[out]batchthe read record batch

◆ schema()

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

Return the schema read from the JSON.


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