|
iceberg-cpp
|
#include <functional>#include <memory>#include <string>#include <string_view>#include <unordered_map>#include <unordered_set>#include <vector>#include "iceberg/iceberg_export.h"#include "iceberg/result.h"#include "iceberg/schema_field.h"#include "iceberg/type_fwd.h"#include "iceberg/util/string_util.h"Go to the source code of this file.
Classes | |
| class | iceberg::IdToFieldVisitor |
| Visitor for building a map from field ID to SchemaField reference. More... | |
| class | iceberg::NameToIdVisitor |
| Visitor for building maps from field name to field ID and field ID to field name. More... | |
| class | iceberg::PositionPathVisitor |
| Visitor for building a map from field ID to position path. More... | |
| class | iceberg::PruneColumnVisitor |
| Visitor for pruning columns based on selected field IDs. More... | |
| class | iceberg::GetProjectedIdsVisitor |
| Visitor for getting projected field IDs. More... | |
| class | iceberg::AssignFreshIdVisitor |
| Assigns fresh IDs to all fields in the schema. More... | |
Functions | |
| std::unordered_map< int32_t, int32_t > | iceberg::IndexParents (const StructType &root_struct) |
| Index parent field IDs for all fields in a struct hierarchy. | |
| Result< std::shared_ptr< Schema > > | iceberg::AssignFreshIds (int32_t schema_id, const Schema &schema, std::function< int32_t()> next_id) |
| Assigns fresh IDs to all fields in a schema. | |
| bool | iceberg::IsPromotionAllowed (const std::shared_ptr< Type > &from_type, const std::shared_ptr< Type > &to_type) |
| Check if type promotion from one type to another is allowed. | |
Utility functions and visitors for Iceberg types.
| ICEBERG_EXPORT Result< std::shared_ptr< Schema > > iceberg::AssignFreshIds | ( | int32_t | schema_id, |
| const Schema & | schema, | ||
| std::function< int32_t()> | next_id | ||
| ) |
Assigns fresh IDs to all fields in a schema.
| schema_id | An ID assigned to this schema |
| schema | The schema to assign IDs to. |
| next_id | An id assignment function, which returns the next ID to assign. |
| ICEBERG_EXPORT std::unordered_map< int32_t, int32_t > iceberg::IndexParents | ( | const StructType & | root_struct | ) |
Index parent field IDs for all fields in a struct hierarchy.
| root_struct | The root struct type to analyze |
| ICEBERG_EXPORT bool iceberg::IsPromotionAllowed | ( | const std::shared_ptr< Type > & | from_type, |
| const std::shared_ptr< Type > & | to_type | ||
| ) |
Check if type promotion from one type to another is allowed.
Type promotion rules:
| from_type | The original type |
| to_type | The target type |