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

Month transform that extracts the number of months from timestamp inputs since the epoch. More...

#include <transform_function.h>

Inheritance diagram for iceberg::MonthTransform:
iceberg::TransformFunction

Public Member Functions

 MonthTransform (std::shared_ptr< Type > const &source_type)
 
Result< LiteralTransform (const Literal &literal) override
 Extract a date or timestamp month, as months from 1970-01-01.
 
std::shared_ptr< TypeResultType () const override
 Returns INT32 as the output type.
 
- 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 MonthTransform.
 

Detailed Description

Month transform that extracts the number of months from timestamp inputs since the epoch.

Constructor & Destructor Documentation

◆ MonthTransform()

iceberg::MonthTransform::MonthTransform ( 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::MonthTransform::Make ( std::shared_ptr< Type > const &  source_type)
static

Create a MonthTransform.

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

◆ ResultType()

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

Returns INT32 as the output type.

Implements iceberg::TransformFunction.

◆ Transform()

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

Extract a date or timestamp month, as months from 1970-01-01.

Implements iceberg::TransformFunction.


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