A type combined with a name.
More...
#include <schema_field.h>
|
| | SchemaField (int32_t field_id, std::string_view name, std::shared_ptr< Type > type, bool optional, std::string_view doc={}, std::shared_ptr< const Literal > initial_default=nullptr, std::shared_ptr< const Literal > write_default=nullptr) |
| | Construct a field.
|
| |
|
int32_t | field_id () const |
| | Get the field ID.
|
| |
|
std::string_view | name () const |
| | Get the field name.
|
| |
|
const std::shared_ptr< Type > & | type () const |
| | Get the field type.
|
| |
|
bool | optional () const |
| | Get whether the field is optional.
|
| |
|
std::string_view | doc () const |
| | Get the field documentation.
|
| |
|
const std::shared_ptr< const Literal > & | initial_default () const |
| | Get the owning pointer to the default value for this field used when reading rows written before the field existed (v3 initial-default), or null if absent.
|
| |
|
const std::shared_ptr< const Literal > & | write_default () const |
| | Get the owning pointer to the default value for this field used when a writer does not supply a value (v3 write-default), or null if absent.
|
| |
| std::string | ToString () const override |
| | Get a user-readable string representation.
|
| |
|
Status | Validate () const |
| |
|
SchemaField | AsRequired () const |
| |
|
SchemaField | AsOptional () const |
| |
|
|
static constexpr int32_t | kInvalidFieldId = -1 |
| |
A type combined with a name.
◆ SchemaField()
| iceberg::SchemaField::SchemaField |
( |
int32_t |
field_id, |
|
|
std::string_view |
name, |
|
|
std::shared_ptr< Type > |
type, |
|
|
bool |
optional, |
|
|
std::string_view |
doc = {}, |
|
|
std::shared_ptr< const Literal > |
initial_default = nullptr, |
|
|
std::shared_ptr< const Literal > |
write_default = nullptr |
|
) |
| |
Construct a field.
- Parameters
-
| [in] | field_id | The field ID. |
| [in] | name | The field name. |
| [in] | type | The field type. |
| [in] | optional | Whether values of this field are required or nullable. |
| [in] | doc | Optional documentation string for the field. |
| [in] | initial_default | The v3 initial-default value, or null if absent. The field shares ownership of the (immutable) value. |
| [in] | write_default | The v3 write-default value, or null if absent. The field shares ownership of the (immutable) value. |
◆ ToString()
| std::string iceberg::SchemaField::ToString |
( |
| ) |
const |
|
overridevirtual |
The documentation for this class was generated from the following files: