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

Day transform that extracts the number of days from timestamp inputs since the epoch. More...

#include <transform_function.h>

Inheritance diagram for iceberg::DayTransform:
iceberg::TransformFunction

Public Member Functions

 DayTransform (std::shared_ptr< Type > const &source_type)
 
Result< LiteralTransform (const Literal &literal) override
 Extract a date or timestamp day, as days from 1970-01-01.
 
std::shared_ptr< TypeResultType () const override
 Return the result type of a day transform.
 
- Public Member Functions inherited from iceberg::TransformFunction
 TransformFunction (TransformType transform_type, std::shared_ptr< Type > source_type)
 
TransformType transform_type () const
 Get the transform type.
 
const std::shared_ptr< Type > & source_type () const
 Get the source type of transform function.
 

Static Public Member Functions

static Result< std::unique_ptr< TransformFunction > > Make (std::shared_ptr< Type > const &source_type)
 Create a DayTransform.
 

Detailed Description

Day transform that extracts the number of days from timestamp inputs since the epoch.

Constructor & Destructor Documentation

◆ DayTransform()

iceberg::DayTransform::DayTransform ( std::shared_ptr< Type > const &  source_type)
explicit
Parameters
source_typeMust be a timestamp type.

Member Function Documentation

◆ Make()

Result< std::unique_ptr< TransformFunction > > iceberg::DayTransform::Make ( std::shared_ptr< Type > const &  source_type)
static

Create a DayTransform.

Parameters
source_typeType of the input data.
Returns
A Result containing the DayTransform or an error.

◆ ResultType()

std::shared_ptr< Type > iceberg::DayTransform::ResultType ( ) const
overridevirtual

Return the result type of a day transform.

Note: The physical representation conforms to the Iceberg spec as DateType is internally converted to int. The DateType returned here provides a more human-readable way to display the partition field.

Implements iceberg::TransformFunction.

◆ Transform()

Result< Literal > iceberg::DayTransform::Transform ( const Literal literal)
overridevirtual

Extract a date or timestamp day, as days from 1970-01-01.

Implements iceberg::TransformFunction.


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