iceberg-cpp
Loading...
Searching...
No Matches
Public Member Functions | Friends | List of all members
iceberg::TransformFunction Class Referenceabstract

A transform function used for partitioning. More...

#include <transform.h>

Inheritance diagram for iceberg::TransformFunction:
iceberg::BucketTransform iceberg::DayTransform iceberg::HourTransform iceberg::IdentityTransform iceberg::MonthTransform iceberg::TruncateTransform iceberg::VoidTransform iceberg::YearTransform

Public Member Functions

 TransformFunction (TransformType transform_type, std::shared_ptr< Type > source_type)
 
virtual Result< LiteralTransform (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< TypeResultType () const =0
 Get the result type of transform function.
 

Friends

bool operator== (const TransformFunction &lhs, const TransformFunction &rhs)
 

Detailed Description

A transform function used for partitioning.

Member Function Documentation

◆ ResultType()

virtual std::shared_ptr< Type > iceberg::TransformFunction::ResultType ( ) const
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.

◆ Transform()

virtual Result< Literal > iceberg::TransformFunction::Transform ( const Literal literal)
pure virtual

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