![]() |
Signet Forge 0.1.0
C++20 Parquet library with AI-native extensions
|
DEMO |
Exports Signet Forge tensors and columns as Arrow C Data Interface structs. More...
#include <arrow_bridge.hpp>
Static Public Member Functions | |
| static expected< void > | export_tensor (const TensorView &tensor, const std::string &name, ArrowArray *out_array, ArrowSchema *out_schema) |
| Export a TensorView as an ArrowArray + ArrowSchema pair (zero-copy). | |
| static expected< void > | export_column (const void *data, int64_t num_values, PhysicalType physical_type, const std::string &name, ArrowArray *out_array, ArrowSchema *out_schema) |
| Export a 1D column of a primitive Parquet type as ArrowArray + ArrowSchema (zero-copy). | |
Exports Signet Forge tensors and columns as Arrow C Data Interface structs.
For numeric types this is zero-copy: the ArrowArray.buffers[1] pointer is set directly to the source data. The source data must remain valid for the entire lifetime of the exported ArrowArray.
The caller is responsible for calling the release() callbacks on both the ArrowArray and ArrowSchema when done.
Definition at line 307 of file arrow_bridge.hpp.
|
inlinestatic |
Export a 1D column of a primitive Parquet type as ArrowArray + ArrowSchema (zero-copy).
For numeric physical types (INT32, INT64, FLOAT, DOUBLE, BOOLEAN), this is zero-copy: buffers[1] points to the raw data pointer. The data pointer must remain valid for the entire lifetime of the ArrowArray.
| data | Pointer to contiguous column data (must not be null). |
| num_values | Number of values in the column (must be > 0). |
| physical_type | Parquet physical type of the column. |
| name | Column name for the ArrowSchema. |
| out_array | Output ArrowArray (caller-allocated, populated on success). |
| out_schema | Output ArrowSchema (caller-allocated, populated on success). |
Definition at line 406 of file arrow_bridge.hpp.
|
inlinestatic |
Export a TensorView as an ArrowArray + ArrowSchema pair (zero-copy).
The tensor is flattened to 1D for Arrow (Arrow arrays are 1D). For numeric types, this is zero-copy: buffers[1] points into the TensorView's memory. The TensorView must remain valid for the entire lifetime of the ArrowArray.
| tensor | The tensor to export (must be valid and contiguous). |
| name | The column/field name for the ArrowSchema. |
| out_array | Output ArrowArray (caller-allocated, populated on success). |
| out_schema | Output ArrowSchema (caller-allocated, populated on success). |
Definition at line 325 of file arrow_bridge.hpp.