A data type representing a dictionary of values.
More...
#include <type.h>
|
|
| MapType (SchemaField key, SchemaField value) |
| | Construct a map of the given key/value fields. The field names should be "key" and "value", respectively.
|
| |
|
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).
|
| |
| 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).
|
| |
|
|
static constexpr const TypeId | kTypeId = TypeId::kMap |
| |
|
static constexpr const std::string_view | kKeyName = "key" |
| |
|
static constexpr const std::string_view | kValueName = "value" |
| |
|
| bool | Equals (const Type &other) const override |
| | Compare two types for equality.
|
| |
|
|
using | SchemaFieldConstRef = std::reference_wrapper< const SchemaField > |
| |
A data type representing a dictionary of values.
◆ Equals()
| bool iceberg::MapType::Equals |
( |
const Type & |
other | ) |
const |
|
overrideprotectedvirtual |
◆ fields()
| std::span< const SchemaField > iceberg::MapType::fields |
( |
| ) |
const |
|
overridevirtual |
◆ GetFieldById()
| Result< std::optional< NestedType::SchemaFieldConstRef > > iceberg::MapType::GetFieldById |
( |
int32_t |
field_id | ) |
const |
|
overridevirtual |
◆ GetFieldByIndex()
| Result< std::optional< NestedType::SchemaFieldConstRef > > iceberg::MapType::GetFieldByIndex |
( |
int32_t |
index | ) |
const |
|
overridevirtual |
◆ GetFieldByName() [1/2]
| Result< std::optional< NestedType::SchemaFieldConstRef > > iceberg::MapType::GetFieldByName |
( |
std::string_view |
name, |
|
|
bool |
case_sensitive |
|
) |
| const |
|
overridevirtual |
Get a field by name. Return an error Status if the field name is not unique; prefer GetFieldById or GetFieldByIndex when possible.
- Note
- This is O(1) complexity.
Implements iceberg::NestedType.
◆ GetFieldByName() [2/2]
| virtual Result< std::optional< SchemaFieldConstRef > > iceberg::NestedType::GetFieldByName |
( |
std::string_view |
name, |
|
|
bool |
case_sensitive |
|
) |
| const |
|
virtual |
Get a field by name. Return an error Status if the field name is not unique; prefer GetFieldById or GetFieldByIndex when possible.
- Note
- This is O(1) complexity.
Implements iceberg::NestedType.
◆ ToString()
| std::string iceberg::MapType::ToString |
( |
| ) |
const |
|
overridevirtual |
◆ type_id()
| TypeId iceberg::MapType::type_id |
( |
| ) |
const |
|
overridevirtual |
The documentation for this class was generated from the following files:
- iceberg/type.h
- iceberg/type.cc