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

#include <arrow/array.h>

Inheritance diagram for arrow::BinaryArray:
arrow::FlatArray arrow::Array arrow::StringArray

Public Types

using TypeClass = BinaryType
 

Public Member Functions

 BinaryArray (const std::shared_ptr< ArrayData > &data)
 
 BinaryArray (int64_t length, const std::shared_ptr< Buffer > &value_offsets, const std::shared_ptr< Buffer > &data, const std::shared_ptr< Buffer > &null_bitmap=NULLPTR, int64_t null_count=0, int64_t offset=0)
 
const uint8_t * GetValue (int64_t i, int32_t *out_length) const
 
std::string GetString (int64_t i) const
 Get binary value as a std::string. More...
 
std::shared_ptr< Buffervalue_offsets () const
 Note that this buffer does not account for any slice offset. More...
 
std::shared_ptr< Buffervalue_data () const
 Note that this buffer does not account for any slice offset. More...
 
const int32_t * raw_value_offsets () const
 
int32_t value_offset (int64_t i) const
 
int32_t value_length (int64_t i) const
 
- Public Member Functions inherited from arrow::Array
virtual ~Array ()=default
 
bool IsNull (int64_t i) const
 Return true if value at index is null. Does not boundscheck. More...
 
bool IsValid (int64_t i) const
 Return true if value at index is valid (not null). More...
 
int64_t length () const
 Size in the number of elements this array contains. More...
 
int64_t offset () const
 A relative position into another array's data, to enable zero-copy slicing. More...
 
int64_t null_count () const
 The number of null entries in the array. More...
 
std::shared_ptr< DataTypetype () const
 
Type::type type_id () const
 
std::shared_ptr< Buffernull_bitmap () const
 Buffer for the null bitmap. More...
 
const uint8_t * null_bitmap_data () const
 Raw pointer to the null bitmap. More...
 
bool Equals (const Array &arr) const
 
bool Equals (const std::shared_ptr< Array > &arr) const
 
bool ApproxEquals (const std::shared_ptr< Array > &arr) const
 
bool ApproxEquals (const Array &arr) const
 
bool RangeEquals (int64_t start_idx, int64_t end_idx, int64_t other_start_idx, const std::shared_ptr< Array > &other) const
 Compare if the range of slots specified are equal for the given array and this array. More...
 
bool RangeEquals (const Array &other, int64_t start_idx, int64_t end_idx, int64_t other_start_idx) const
 
Status Accept (ArrayVisitor *visitor) const
 
std::shared_ptr< ArraySlice (int64_t offset, int64_t length) const
 Construct a zero-copy slice of the array with the indicated offset and length. More...
 
std::shared_ptr< ArraySlice (int64_t offset) const
 Slice from offset until end of the array. More...
 
std::shared_ptr< ArrayDatadata () const
 
int num_fields () const
 
std::string ToString () const
 

Protected Member Functions

 BinaryArray ()
 
void SetData (const std::shared_ptr< ArrayData > &data)
 Protected method for constructors. More...
 
 BinaryArray (const std::shared_ptr< DataType > &type, int64_t length, const std::shared_ptr< Buffer > &value_offsets, const std::shared_ptr< Buffer > &data, const std::shared_ptr< Buffer > &null_bitmap=NULLPTR, int64_t null_count=0, int64_t offset=0)
 
- Protected Member Functions inherited from arrow::Array
 Array ()
 
void SetData (const std::shared_ptr< ArrayData > &data)
 Protected method for constructors. More...
 

Protected Attributes

const int32_t * raw_value_offsets_
 
const uint8_t * raw_data_
 
- Protected Attributes inherited from arrow::Array
std::shared_ptr< ArrayDatadata_
 
const uint8_t * null_bitmap_data_
 

Member Typedef Documentation

◆ TypeClass

Constructor & Destructor Documentation

◆ BinaryArray() [1/4]

arrow::BinaryArray::BinaryArray ( const std::shared_ptr< ArrayData > &  data)
explicit

◆ BinaryArray() [2/4]

arrow::BinaryArray::BinaryArray ( int64_t  length,
const std::shared_ptr< Buffer > &  value_offsets,
const std::shared_ptr< Buffer > &  data,
const std::shared_ptr< Buffer > &  null_bitmap = NULLPTR,
int64_t  null_count = 0,
int64_t  offset = 0 
)

◆ BinaryArray() [3/4]

arrow::BinaryArray::BinaryArray ( )
inlineprotected

◆ BinaryArray() [4/4]

arrow::BinaryArray::BinaryArray ( const std::shared_ptr< DataType > &  type,
int64_t  length,
const std::shared_ptr< Buffer > &  value_offsets,
const std::shared_ptr< Buffer > &  data,
const std::shared_ptr< Buffer > &  null_bitmap = NULLPTR,
int64_t  null_count = 0,
int64_t  offset = 0 
)
protected

Member Function Documentation

◆ GetString()

std::string arrow::BinaryArray::GetString ( int64_t  i) const
inline

Get binary value as a std::string.

Parameters
ithe value index
Returns
the value copied into a std::string

◆ GetValue()

const uint8_t* arrow::BinaryArray::GetValue ( int64_t  i,
int32_t *  out_length 
) const
inline

◆ raw_value_offsets()

const int32_t* arrow::BinaryArray::raw_value_offsets ( ) const
inline

◆ SetData()

void arrow::BinaryArray::SetData ( const std::shared_ptr< ArrayData > &  data)
protected

Protected method for constructors.

◆ value_data()

std::shared_ptr<Buffer> arrow::BinaryArray::value_data ( ) const
inline

Note that this buffer does not account for any slice offset.

◆ value_length()

int32_t arrow::BinaryArray::value_length ( int64_t  i) const
inline

◆ value_offset()

int32_t arrow::BinaryArray::value_offset ( int64_t  i) const
inline

◆ value_offsets()

std::shared_ptr<Buffer> arrow::BinaryArray::value_offsets ( ) const
inline

Note that this buffer does not account for any slice offset.

Member Data Documentation

◆ raw_data_

const uint8_t* arrow::BinaryArray::raw_data_
protected

◆ raw_value_offsets_

const int32_t* arrow::BinaryArray::raw_value_offsets_
protected

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