|
iceberg-cpp
|
A transform function used for partitioning. More...
#include <transform.h>
Public Member Functions | |
| TransformFunction (TransformType transform_type, std::shared_ptr< Type > source_type) | |
| virtual Result< Literal > | Transform (const Literal &literal)=0 |
| Transform an input Literal to a new Literal. | |
| TransformType | transform_type () const |
| Get the transform type. | |
| const std::shared_ptr< Type > & | source_type () const |
| Get the source type of transform function. | |
| virtual std::shared_ptr< Type > | ResultType () const =0 |
| Get the result type of transform function. | |
Friends | |
| bool | operator== (const TransformFunction &lhs, const TransformFunction &rhs) |
A transform function used for partitioning.
|
pure virtual |
Get the result type of transform function.
Note: This method defines both the physical and display representation of the partition field. The physical representation must conform to the Iceberg spec. The display representation can deviate from the spec, such as by transforming the value into a more human-readable format.
Implemented in iceberg::IdentityTransform, iceberg::BucketTransform, iceberg::TruncateTransform, iceberg::YearTransform, iceberg::MonthTransform, iceberg::DayTransform, iceberg::HourTransform, and iceberg::VoidTransform.
|
pure virtual |
Transform an input Literal to a new Literal.
All transforms must return null for a null input value.
Implemented in iceberg::IdentityTransform, iceberg::BucketTransform, iceberg::TruncateTransform, iceberg::YearTransform, iceberg::MonthTransform, iceberg::DayTransform, iceberg::HourTransform, and iceberg::VoidTransform.