|
iceberg-cpp
|
Movable RAII builder that materializes rows into an Arrow struct array. More...
#include <arrow_row_builder_internal.h>
Public Member Functions | |
| ArrowRowBuilder (ArrowRowBuilder &&other) noexcept | |
| ArrowRowBuilder & | operator= (ArrowRowBuilder &&other) noexcept |
| ArrowRowBuilder (const ArrowRowBuilder &)=delete | |
| ArrowRowBuilder & | operator= (const ArrowRowBuilder &)=delete |
| int64_t | num_columns () const |
| The number of top-level columns in the batch. | |
| ArrowArray * | column (int64_t index) |
| Access the nanoarrow child builder for a top-level column. | |
| Status | FinishRow () |
| Finish the current row, advancing the struct length by one. | |
| Result< ArrowArray > | Finish () && |
| Finish building and transfer ownership of the resulting array. | |
Static Public Member Functions | |
| static Result< ArrowRowBuilder > | Make (const Schema &schema) |
| Create a row builder from an Iceberg schema. | |
| static Result< ArrowRowBuilder > | Make (const ArrowSchema *schema) |
| Create a row builder from an ArrowSchema. | |
Movable RAII builder that materializes rows into an Arrow struct array.
Handles the nanoarrow lifecycle: InitFromSchema → StartAppending → ... append values ... → FinishBuilding → Release.
Two constructors:
Make(schema) accepts an Iceberg Schema (typical for metadata tables).Make(arrow_schema) accepts a raw ArrowSchema (for lower-level callers like position_delete_writer or manifest_adapter).Typical usage:
| ArrowArray * iceberg::ArrowRowBuilder::column | ( | int64_t | index | ) |
Access the nanoarrow child builder for a top-level column.
| index | Zero-based column index. Returns nullptr if out of range. |
| Result< ArrowArray > iceberg::ArrowRowBuilder::Finish | ( | ) | && |
Finish building and transfer ownership of the resulting array.
The builder must not be used after this call.
| Status iceberg::ArrowRowBuilder::FinishRow | ( | ) |
Finish the current row, advancing the struct length by one.
Call after appending exactly one value (or null) to every column.
|
static |
Create a row builder from an ArrowSchema.
The schema must outlive this call (the caller guards it). On failure the partially-initialized array is released automatically.