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

A data structure managing a list of primitive Arrow arrays logically as one large array. More...

#include <arrow/table.h>

Public Member Functions

 ChunkedArray (const ArrayVector &chunks)
 
 ChunkedArray (const ArrayVector &chunks, const std::shared_ptr< DataType > &type)
 
int64_t length () const
 
int64_t null_count () const
 
int num_chunks () const
 
std::shared_ptr< Arraychunk (int i) const
 
const ArrayVectorchunks () const
 
std::shared_ptr< ChunkedArraySlice (int64_t offset, int64_t length) const
 Construct a zero-copy slice of the chunked array with the indicated offset and length. More...
 
std::shared_ptr< ChunkedArraySlice (int64_t offset) const
 Slice from offset until end of the chunked array. More...
 
Status Flatten (MemoryPool *pool, std::vector< std::shared_ptr< ChunkedArray >> *out) const
 Flatten this chunked array as a vector of chunked arrays, one for each struct field. More...
 
std::shared_ptr< DataTypetype () const
 
bool Equals (const ChunkedArray &other) const
 
bool Equals (const std::shared_ptr< ChunkedArray > &other) const
 

Protected Attributes

ArrayVector chunks_
 
int64_t length_
 
int64_t null_count_
 
std::shared_ptr< DataTypetype_
 

Detailed Description

A data structure managing a list of primitive Arrow arrays logically as one large array.

Constructor & Destructor Documentation

◆ ChunkedArray() [1/2]

arrow::ChunkedArray::ChunkedArray ( const ArrayVector chunks)
explicit

◆ ChunkedArray() [2/2]

arrow::ChunkedArray::ChunkedArray ( const ArrayVector chunks,
const std::shared_ptr< DataType > &  type 
)

Member Function Documentation

◆ chunk()

std::shared_ptr<Array> arrow::ChunkedArray::chunk ( int  i) const
inline
Returns
chunk a particular chunk from the chunked array

◆ chunks()

const ArrayVector& arrow::ChunkedArray::chunks ( ) const
inline

◆ Equals() [1/2]

bool arrow::ChunkedArray::Equals ( const ChunkedArray other) const

◆ Equals() [2/2]

bool arrow::ChunkedArray::Equals ( const std::shared_ptr< ChunkedArray > &  other) const

◆ Flatten()

Status arrow::ChunkedArray::Flatten ( MemoryPool pool,
std::vector< std::shared_ptr< ChunkedArray >> *  out 
) const

Flatten this chunked array as a vector of chunked arrays, one for each struct field.

Parameters
[in]poolThe pool for buffer allocations, if any
[out]outThe resulting vector of arrays

◆ length()

int64_t arrow::ChunkedArray::length ( ) const
inline
Returns
the total length of the chunked array; computed on construction

◆ null_count()

int64_t arrow::ChunkedArray::null_count ( ) const
inline
Returns
the total number of nulls among all chunks

◆ num_chunks()

int arrow::ChunkedArray::num_chunks ( ) const
inline

◆ Slice() [1/2]

std::shared_ptr<ChunkedArray> arrow::ChunkedArray::Slice ( int64_t  offset,
int64_t  length 
) const

Construct a zero-copy slice of the chunked array with the indicated offset and length.

Parameters
[in]offsetthe position of the first element in the constructed slice
[in]lengththe length of the slice. If there are not enough elements in the chunked array, the length will be adjusted accordingly
Returns
a new object wrapped in std::shared_ptr<ChunkedArray>

◆ Slice() [2/2]

std::shared_ptr<ChunkedArray> arrow::ChunkedArray::Slice ( int64_t  offset) const

Slice from offset until end of the chunked array.

◆ type()

std::shared_ptr<DataType> arrow::ChunkedArray::type ( ) const
inline

Member Data Documentation

◆ chunks_

ArrayVector arrow::ChunkedArray::chunks_
protected

◆ length_

int64_t arrow::ChunkedArray::length_
protected

◆ null_count_

int64_t arrow::ChunkedArray::null_count_
protected

◆ type_

std::shared_ptr<DataType> arrow::ChunkedArray::type_
protected

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