|
Lance C/C++ Bindings
C ABI and header-only C++ RAII wrappers for the Lance columnar data format
|
LanceBatch conversion to and from Arrow C Data Interface structs. More...
#include <stdint.h>#include "lance/attributes.h"#include "lance/arrow_abi.h"#include "lance/fwd.h"Go to the source code of this file.
Functions | |
| LANCE_API int32_t | lance_batch_to_arrow (const LanceBatch *batch, struct ArrowArray *out_array, struct ArrowSchema *out_schema) |
| LANCE_API int32_t | lance_batch_from_arrow (struct ArrowArray *array, const struct ArrowSchema *schema, LanceBatch **out) |
| LANCE_API void | lance_batch_free (LanceBatch *batch) |
LanceBatch conversion to and from Arrow C Data Interface structs.
Definition in file batch.h.
| LANCE_API void lance_batch_free | ( | LanceBatch * | batch | ) |
Free a batch handle.
| LANCE_API int32_t lance_batch_from_arrow | ( | struct ArrowArray * | array, |
| const struct ArrowSchema * | schema, | ||
| LanceBatch ** | out ) |
Import one Arrow record batch.
A non-NULL array is consumed on every return, including validation and conversion failures. The source slot is left in its canonical released state. schema is borrowed and is never released or modified. out is written only on success and is unchanged on failure.
The complete schema is retained, including schema metadata, field metadata, and extension metadata. A zero-column batch retains its row count.
| LANCE_API int32_t lance_batch_to_arrow | ( | const LanceBatch * | batch, |
| struct ArrowArray * | out_array, | ||
| struct ArrowSchema * | out_schema ) |
Export a batch as Arrow C Data Interface structs.