iceberg-cpp
Loading...
Searching...
No Matches
Static Public Member Functions | List of all members
iceberg::Projections Struct Reference

Utils to project expressions on rows to expressions on partitions. More...

#include <projections.h>

Static Public Member Functions

static std::unique_ptr< ProjectionEvaluatorInclusive (const PartitionSpec &spec, const Schema &schema, bool case_sensitive=true)
 Creates an inclusive ProjectionEvaluator for the partition spec.
 
static std::unique_ptr< ProjectionEvaluatorStrict (const PartitionSpec &spec, const Schema &schema, bool case_sensitive=true)
 Creates a strict ProjectionEvaluator for the partition spec.
 

Detailed Description

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.

Member Function Documentation

◆ Inclusive()

std::unique_ptr< ProjectionEvaluator > iceberg::Projections::Inclusive ( const PartitionSpec spec,
const Schema schema,
bool  case_sensitive = true 
)
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.

Parameters
speca partition spec
schemaa schema
case_sensitivewhether the Projection should consider case sensitivity on column names or not. Defaults to true (case sensitive).
Returns
an inclusive projection evaluator for the partition spec

◆ Strict()

std::unique_ptr< ProjectionEvaluator > iceberg::Projections::Strict ( const PartitionSpec spec,
const Schema schema,
bool  case_sensitive = true 
)
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.

Parameters
speca partition spec
schemaa schema
case_sensitivewhether the Projection should consider case sensitivity on column names or not. Defaults to true (case sensitive).
Returns
a strict projection evaluator for the partition spec

The documentation for this struct was generated from the following files: