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

#include <arrow/builder.h>

Inheritance diagram for arrow::FixedSizeBinaryBuilder:
arrow::ArrayBuilder arrow::Decimal128Builder

Public Member Functions

 FixedSizeBinaryBuilder (const std::shared_ptr< DataType > &type, MemoryPool *pool ARROW_MEMORY_POOL_DEFAULT)
Status Append (const uint8_t *value)
Status Append (const char *value)
template<size_t NBYTES>
Status Append (const std::array< uint8_t, NBYTES > &value)
Status AppendValues (const uint8_t *data, int64_t length, const uint8_t *valid_bytes=NULLPTR)
Status Append (const std::string &value)
Status AppendNull ()
void Reset () override
 Reset the builder. More...
Status Resize (int64_t capacity) override
 Ensure that enough memory has been allocated to fit the indicated number of total elements in the builder, including any that have already been appended. More...
Status FinishInternal (std::shared_ptr< ArrayData > *out) override
 Return result of builder as an internal generic ArrayData object. More...
int64_t value_data_length () const
int32_t byte_width () const
const uint8_t * GetValue (int64_t i) const
 Temporary access to a value. More...
- Public Member Functions inherited from arrow::ArrayBuilder
 ArrayBuilder (const std::shared_ptr< DataType > &type, MemoryPool *pool)
virtual ~ArrayBuilder ()=default
ArrayBuilderchild (int i)
 For nested types. More...
int num_children () const
int64_t length () const
int64_t null_count () const
int64_t capacity () const
Status AppendToBitmap (bool is_valid)
 Append to null bitmap. More...
Status AppendToBitmap (const uint8_t *valid_bytes, int64_t length)
 Vector append. More...
Status SetNotNull (int64_t length)
 Set the next length bits to not null (i.e. valid). More...
Status Reserve (int64_t additional_capacity)
 Ensure that there is enough space allocated to add the indicated number of elements without any further calls to Resize. More...
Status Advance (int64_t elements)
 For cases where raw data was memcpy'd into the internal buffers, allows us to advance the length of the builder. More...
Status Finish (std::shared_ptr< Array > *out)
 Return result of builder as an Array object. More...
std::shared_ptr< DataTypetype () const
void UnsafeAppendToBitmap (bool is_valid)
template<typename IterType >
void UnsafeAppendToBitmap (const IterType &begin, const IterType &end)

Protected Attributes

int32_t byte_width_
BufferBuilder byte_builder_
- Protected Attributes inherited from arrow::ArrayBuilder
std::shared_ptr< DataTypetype_
std::shared_ptr< ResizableBuffernull_bitmap_
int64_t null_count_
uint8_t * null_bitmap_data_
int64_t length_
int64_t capacity_
std::vector< std::unique_ptr< ArrayBuilder > > children_

Additional Inherited Members

- Protected Member Functions inherited from arrow::ArrayBuilder
 ArrayBuilder ()
void UnsafeAppendToBitmap (const uint8_t *valid_bytes, int64_t length)
void UnsafeAppendToBitmap (const std::vector< bool > &is_valid)
void UnsafeSetNotNull (int64_t length)

Constructor & Destructor Documentation

◆ FixedSizeBinaryBuilder()

arrow::FixedSizeBinaryBuilder::FixedSizeBinaryBuilder ( const std::shared_ptr< DataType > &  type,

Member Function Documentation

◆ Append() [1/4]

Status arrow::FixedSizeBinaryBuilder::Append ( const uint8_t *  value)

◆ Append() [2/4]

Status arrow::FixedSizeBinaryBuilder::Append ( const char *  value)

◆ Append() [3/4]

template<size_t NBYTES>
Status arrow::FixedSizeBinaryBuilder::Append ( const std::array< uint8_t, NBYTES > &  value)

◆ Append() [4/4]

Status arrow::FixedSizeBinaryBuilder::Append ( const std::string &  value)

◆ AppendNull()

Status arrow::FixedSizeBinaryBuilder::AppendNull ( )

◆ AppendValues()

Status arrow::FixedSizeBinaryBuilder::AppendValues ( const uint8_t *  data,
int64_t  length,
const uint8_t *  valid_bytes = NULLPTR 

◆ byte_width()

int32_t arrow::FixedSizeBinaryBuilder::byte_width ( ) const

◆ FinishInternal()

Status arrow::FixedSizeBinaryBuilder::FinishInternal ( std::shared_ptr< ArrayData > *  out)

Return result of builder as an internal generic ArrayData object.

Resets builder except for dictionary builder

[out]outthe finalized ArrayData object

Implements arrow::ArrayBuilder.

Reimplemented in arrow::Decimal128Builder.

◆ GetValue()

const uint8_t* arrow::FixedSizeBinaryBuilder::GetValue ( int64_t  i) const

Temporary access to a value.

This pointer becomes invalid on the next modifying operation.

◆ Reset()

void arrow::FixedSizeBinaryBuilder::Reset ( )

Reset the builder.

Reimplemented from arrow::ArrayBuilder.

◆ Resize()

Status arrow::FixedSizeBinaryBuilder::Resize ( int64_t  capacity)

Ensure that enough memory has been allocated to fit the indicated number of total elements in the builder, including any that have already been appended.

Does not account for reallocations that may be due to variable size data, like binary values. To make space for incremental appends, use Reserve instead.

[in]capacitythe minimum number of additional array values

Reimplemented from arrow::ArrayBuilder.

◆ value_data_length()

int64_t arrow::FixedSizeBinaryBuilder::value_data_length ( ) const
size of values buffer so far

Member Data Documentation

◆ byte_builder_

BufferBuilder arrow::FixedSizeBinaryBuilder::byte_builder_

◆ byte_width_

int32_t arrow::FixedSizeBinaryBuilder::byte_width_

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