|
Lance C/C++ Bindings
C ABI and header-only C++ RAII wrappers for the Lance columnar data format
|
#include <lance/detail/declarations.hpp>
Public Member Functions | |
| LanceSchema (::LanceSchema *schema) | |
| LanceSchema (LanceSchema &&) noexcept=default | |
| LanceSchema & | operator= (LanceSchema &&) noexcept=default |
| LanceSchema (const LanceSchema &)=delete | |
| LanceSchema & | operator= (const LanceSchema &)=delete |
| LanceSchema | clone () const |
| Independently owned native clone. | |
| int32_t | field_id (const std::string &column) const |
| void | to_arrow (ArrowSchema *out) const |
| const ::LanceSchema * | c_handle () const |
Static Public Member Functions | |
| static LanceSchema | from_dataset (const Dataset &dataset) |
| Clone the current snapshot schema of a dataset. | |
| static LanceSchema | from_fragment (const Fragment &fragment) |
| Clone the staged snapshot schema of a fragment. | |
| static LanceSchema | from_operation (const Operation &operation) |
| static LanceSchema | project (const LanceSchema &schema, const std::vector< std::string > &columns) |
| static LanceSchema | from_arrow (const ArrowSchema *schema) |
Move-only owner of a native Lance schema.
Unlike the Arrow export, a native schema preserves field and parent IDs, logical types, encodings, dictionary values, nested metadata, field order and nullability. A clone remains valid after the dataset, fragment or operation that produced it is closed.
Definition at line 2830 of file declarations.hpp.
|
explicit |
|
defaultnoexcept |
|
delete |
| const ::LanceSchema * lance::LanceSchema::c_handle | ( | ) | const |
| LanceSchema lance::LanceSchema::clone | ( | ) | const |
Independently owned native clone.
| int32_t lance::LanceSchema::field_id | ( | const std::string & | column | ) | const |
Native Lance field ID for a column path. Throws when the path does not resolve.
|
static |
Build a native schema from a borrowed Arrow schema. Fields without a lance:field_id metadata entry receive fresh native IDs; existing IDs, dictionaries, and metadata are preserved. Throws on native validation failure.
|
static |
Clone the current snapshot schema of a dataset.
|
static |
Clone the staged snapshot schema of a fragment.
|
static |
Clone the in-memory schema of an Overwrite, Merge or Project operation. Other kinds throw LANCE_ERR_NOT_SUPPORTED.
|
delete |
|
defaultnoexcept |
|
static |
Project onto ordered native column paths. Paths, order, unknown-column errors and empty-selection behavior are native Schema::project.
| void lance::LanceSchema::to_arrow | ( | ArrowSchema * | out | ) | const |
Export an Arrow interoperability view. out is caller-owned and must be released exactly once. Arrow cannot represent every native detail.