iceberg-cpp
Loading...
Searching...
No Matches
Classes | Functions
arrow_row_builder_internal.h File Reference
#include <cstdint>
#include <map>
#include <span>
#include <string_view>
#include <unordered_map>
#include <vector>
#include "iceberg/arrow_c_data.h"
#include "iceberg/iceberg_export.h"
#include "iceberg/result.h"
#include "iceberg/type_fwd.h"

Go to the source code of this file.

Classes

class  iceberg::ArrowRowBuilder
 Movable RAII builder that materializes rows into an Arrow struct array. More...
 

Functions

Status iceberg::AppendNull (ArrowArray *array)
 Append a null to a nanoarrow array builder.
 
Status iceberg::AppendBoolean (ArrowArray *array, bool value)
 Append a boolean value to a nanoarrow array builder.
 
Status iceberg::AppendInt (ArrowArray *array, int64_t value)
 Append an integer value to a nanoarrow array builder.
 
Status iceberg::AppendUInt (ArrowArray *array, uint64_t value)
 Append an unsigned integer value to a nanoarrow array builder.
 
Status iceberg::AppendDouble (ArrowArray *array, double value)
 Append a double value to a nanoarrow array builder.
 
Status iceberg::AppendString (ArrowArray *array, std::string_view value)
 Append a string value to a nanoarrow array builder.
 
Status iceberg::AppendBytes (ArrowArray *array, std::span< const uint8_t > value)
 Append a binary value to a nanoarrow array builder.
 
Status iceberg::AppendIntList (ArrowArray *array, const std::vector< int32_t > &values)
 Append a list of int32 values to a nanoarrow list array builder.
 
Status iceberg::AppendIntList (ArrowArray *array, const std::vector< int64_t > &values)
 Append a list of int64 values to a nanoarrow list array builder.
 
Status iceberg::AppendStringMap (ArrowArray *array, const std::unordered_map< std::string, std::string > &entries)
 Append a map<string, string> value to a nanoarrow map array builder.
 
Status iceberg::AppendIntMap (ArrowArray *array, const std::map< int32_t, int64_t > &entries)
 Append a map<int32, int64> to a nanoarrow map array builder.
 
Status iceberg::AppendBinaryMap (ArrowArray *array, const std::map< int32_t, std::vector< uint8_t > > &entries)
 Append a map<int32, binary> to a nanoarrow map array builder.
 

Detailed Description

Internal Arrow row-building utilities shared by metadata tables.

Metadata tables (snapshots, history, manifests, ...) materialize in-memory structures into Arrow batches that conform to the table's Iceberg schema. ArrowRowBuilder wraps a nanoarrow ArrowArray initialized from such a schema and exposes per-column access plus typed append helpers so each metadata table can emit rows without re-implementing the nanoarrow boilerplate.

Function Documentation

◆ AppendInt()

ICEBERG_EXPORT Status iceberg::AppendInt ( ArrowArray array,
int64_t  value 
)

Append an integer value to a nanoarrow array builder.

Works for int32/int64/timestamp columns, which nanoarrow stores as int64.

◆ AppendStringMap()

ICEBERG_EXPORT Status iceberg::AppendStringMap ( ArrowArray array,
const std::unordered_map< std::string, std::string > &  entries 
)

Append a map<string, string> value to a nanoarrow map array builder.

Appends one (possibly empty) map element. The iteration order of the resulting entries is unspecified.