|
iceberg-cpp
|
Truncate transform that truncates values to a specified width. More...
#include <transform_function.h>
Public Member Functions | |
| TruncateTransform (std::shared_ptr< Type > const &source_type, int32_t width) | |
| Result< Literal > | Transform (const Literal &literal) override |
| Truncates the input Literal to the specified width. | |
| std::shared_ptr< Type > | ResultType () const override |
| Returns the same type as source_type. | |
| int32_t | width () const |
| Returns the width to truncate to. | |
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, int32_t width) |
| Create a TruncateTransform. | |
Truncate transform that truncates values to a specified width.
| iceberg::TruncateTransform::TruncateTransform | ( | std::shared_ptr< Type > const & | source_type, |
| int32_t | width | ||
| ) |
| source_type | Type of the input data. |
| width | The width to truncate to (e.g., for strings or numbers). |
|
static |
Create a TruncateTransform.
| source_type | Type of the input data. |
| width | The width to truncate to. |
|
overridevirtual |
Returns the same type as source_type.
Implements iceberg::TransformFunction.
Truncates the input Literal to the specified width.
Implements iceberg::TransformFunction.