60 using From = std::variant<std::monostate, size_t, Literal>;
81 std::vector<FieldProjection> fields;
104 const Schema& expected_schema,
const Schema& source_schema,
bool prune_source,
A schema for a Table.
Definition schema.h:51
Definition expected.h:1199
Define symbol visibility macros for core Iceberg APIs.
Define typed literal values used by expressions.
Core Apache Iceberg C++ APIs.
Definition arrow_io_util.h:34
ICEBERG_EXPORT Result< SchemaProjection > Project(const Schema &expected_schema, const Schema &source_schema, bool prune_source, ProjectionMode mode=ProjectionMode::kRead)
Project the expected schema on top of the source schema.
ICEBERG_EXPORT std::string_view ToString(Expression::Operation op)
Returns a string representation of an expression operation.
ProjectionMode
Whether schema projection is used for reading or writing.
Definition schema_util.h:85
@ kRead
Use initial-default and allow type promotion.
@ kWrite
Use write-default, require matching types, and reject optional-to-required.
Define Result, Status, and error helpers.
A field schema partner to carry projection information.
Definition schema_util.h:38
std::variant< std::monostate, size_t, Literal > From
A variant to indicate how to set the value of the field.
Definition schema_util.h:60
std::vector< FieldProjection > children
The children of the field if it is a nested field.
Definition schema_util.h:74
Kind kind
The kind of projection of the field it partners with.
Definition schema_util.h:70
From from
The source to set the value of the field.
Definition schema_util.h:72
Kind
How the field is projected.
Definition schema_util.h:40
std::shared_ptr< ExtraAttributes > attributes
Format-specific attributes for the field.
Definition schema_util.h:76
A schema partner to carry projection information.
Definition schema_util.h:80