|
iceberg-cpp
|
Utils to project expressions on rows to expressions on partitions. More...
#include <projections.h>
Static Public Member Functions | |
| static std::unique_ptr< ProjectionEvaluator > | Inclusive (const PartitionSpec &spec, const Schema &schema, bool case_sensitive=true) |
| Creates an inclusive ProjectionEvaluator for the partition spec. | |
| static std::unique_ptr< ProjectionEvaluator > | Strict (const PartitionSpec &spec, const Schema &schema, bool case_sensitive=true) |
| Creates a strict ProjectionEvaluator for the partition spec. | |
Utils to project expressions on rows to expressions on partitions.
There are two types of projections: inclusive and strict.
An inclusive projection guarantees that if an expression matches a row, the projected expression will match the row's partition.
A strict projection guarantees that if a partition matches a projected expression, then all rows in that partition will match the original expression.
|
static |
Creates an inclusive ProjectionEvaluator for the partition spec.
An evaluator is used to project expressions for a table's data rows into expressions on the table's partition values. The evaluator returned by this function is inclusive and will build expressions with the following guarantee: if the original expression matches a row, then the projected expression will match that row's partition.
Each predicate in the expression is projected using Transform::Project.
| spec | a partition spec |
| schema | a schema |
| case_sensitive | whether the Projection should consider case sensitivity on column names or not. Defaults to true (case sensitive). |
|
static |
Creates a strict ProjectionEvaluator for the partition spec.
An evaluator is used to project expressions for a table's data rows into expressions on the table's partition values. The evaluator returned by this function is strict and will build expressions with the following guarantee: if the projected expression matches a partition, then the original expression will match all rows in that partition.
Each predicate in the expression is projected using Transform::ProjectStrict.
| spec | a partition spec |
| schema | a schema |
| case_sensitive | whether the Projection should consider case sensitivity on column names or not. Defaults to true (case sensitive). |