103 static std::shared_ptr<Transform>
Bucket(int32_t num_buckets);
110 static std::shared_ptr<Transform>
Truncate(int32_t width);
116 static std::shared_ptr<Transform>
Year();
122 static std::shared_ptr<Transform>
Month();
128 static std::shared_ptr<Transform>
Day();
134 static std::shared_ptr<Transform>
Hour();
140 static std::shared_ptr<Transform>
Void();
152 const std::shared_ptr<Type>& source_type)
const;
155 std::shared_ptr<Type>
ResultType(
const std::shared_ptr<Type>& source_type)
const;
165 Status
Validate(
const std::shared_ptr<Type>& source_type)
const;
191 std::string_view name,
const std::shared_ptr<BoundPredicate>& predicate);
203 std::string_view name,
const std::shared_ptr<BoundPredicate>& predicate);
225 return lhs.Equals(rhs);
239 [[nodiscard]]
virtual bool Equals(
const Transform& other)
const;
243 std::variant<std::monostate, int32_t> param_;
256 std::string_view transform_str);
289 std::shared_ptr<Type> source_type_;
Literal is a literal value that is associated with a primitive type.
Definition literal.h:42
Interface for a data type for a field.
Definition type.h:44
Define symbol visibility macros for core Iceberg APIs.
Define typed literal values used by expressions.
Core Apache Iceberg C++ APIs.
Definition arrow_io_util.h:33
ICEBERG_EXPORT Result< std::shared_ptr< Transform > > TransformFromString(std::string_view transform_str)
Converts a string representation of a transform into a Transform instance.
ICEBERG_EXPORT constexpr std::string_view TransformTypeToString(TransformType type)
Get the relative transform name.
Definition transform.h:62
TransformType
Transform types used for partitioning.
Definition transform.h:39
@ kBucket
Hash of value, mod N
@ kTruncate
Value truncated to width W
@ kHour
Extract a timestamp hour, as hours from 1970-01-01 00:00:00.
@ kDay
Extract a date or timestamp day, as days from 1970-01-01.
@ kMonth
Extract a date or timestamp month, as months from 1970-01.
@ kVoid
Always produces null
@ kIdentity
Equal to source value, unmodified.
@ kYear
Extract a date or timestamp year, as years from 1970.
std::expected< T, E > Result
Result alias.
Definition result.h:88
Define Result, Status, and error helpers.