|
iceberg-cpp
|
A data type representing a dictionary of values. More...
#include <type.h>
Public Member Functions | |
| MapType (SchemaField key, SchemaField value) | |
| Construct a map of the given key/value fields. | |
| const SchemaField & | key () const |
| const SchemaField & | value () const |
| TypeId | type_id () const override |
| Get the type ID. | |
| std::string | ToString () const override |
| Get a user-readable string representation. | |
| std::span< const SchemaField > | fields () const override |
| Get a view of the child fields. | |
| Result< std::optional< SchemaFieldConstRef > > | GetFieldById (int32_t field_id) const override |
| Get a field by field ID. | |
| Result< std::optional< SchemaFieldConstRef > > | GetFieldByIndex (int32_t index) const override |
| Get a field by index. | |
| Result< std::optional< SchemaFieldConstRef > > | GetFieldByName (std::string_view name, bool case_sensitive) const override |
| Get a field by name. Return an error Status if the field name is not unique; prefer GetFieldById or GetFieldByIndex when possible. | |
| virtual Result< std::optional< SchemaFieldConstRef > > | GetFieldByName (std::string_view name, bool case_sensitive) const=0 |
| Get a field by name. Return an error Status if the field name is not unique; prefer GetFieldById or GetFieldByIndex when possible. | |
| Result< std::optional< SchemaFieldConstRef > > | GetFieldByName (std::string_view name) const |
| Get a field by name (case-sensitive). | |
Public Member Functions inherited from iceberg::NestedType | |
| bool | is_primitive () const override |
| Is this a primitive type (may not have child fields)? | |
| bool | is_nested () const override |
| Is this a nested type (may have child fields)? | |
| Result< std::optional< SchemaFieldConstRef > > | GetFieldByName (std::string_view name) const |
| Get a field by name (case-sensitive). | |
Public Member Functions inherited from iceberg::Type | |
| bool | is_struct () const |
| Is this a struct type? | |
| bool | is_list () const |
| Is this a list type? | |
| bool | is_map () const |
| Is this a map type? | |
| bool | is_variant () const |
| Is this a variant type? | |
Static Public Member Functions | |
| static Result< std::unique_ptr< MapType > > | Make (SchemaField key, SchemaField value) |
Static Public Attributes | |
| static constexpr const TypeId | kTypeId = TypeId::kMap |
| static constexpr const std::string_view | kKeyName = "key" |
| static constexpr const std::string_view | kValueName = "value" |
Protected Member Functions | |
| bool | Equals (const Type &other) const override |
| Compare two types for equality. | |
Protected Attributes | |
| std::array< SchemaField, 2 > | fields_ |
Additional Inherited Members | |
Public Types inherited from iceberg::NestedType | |
| using | SchemaFieldConstRef = std::reference_wrapper< const SchemaField > |
A data type representing a dictionary of values.
|
explicit |
Construct a map of the given key/value fields.
Use Make or map to validate that the field names are "key" and "value".
|
overrideprotectedvirtual |
Compare two types for equality.
Implements iceberg::Type.
|
overridevirtual |
Get a view of the child fields.
Implements iceberg::NestedType.
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |
Get a field by name. Return an error Status if the field name is not unique; prefer GetFieldById or GetFieldByIndex when possible.
Implements iceberg::NestedType.
|
virtual |
Get a field by name. Return an error Status if the field name is not unique; prefer GetFieldById or GetFieldByIndex when possible.
Implements iceberg::NestedType.
|
overridevirtual |
Get a user-readable string representation.
Implements iceberg::util::Formattable.
|
overridevirtual |
Get the type ID.
Implements iceberg::Type.