104 static std::shared_ptr<Transform>
Bucket(int32_t num_buckets);
111 static std::shared_ptr<Transform>
Truncate(int32_t width);
117 static std::shared_ptr<Transform>
Year();
123 static std::shared_ptr<Transform>
Month();
129 static std::shared_ptr<Transform>
Day();
135 static std::shared_ptr<Transform>
Hour();
141 static std::shared_ptr<Transform>
Void();
153 const std::shared_ptr<Type>& source_type)
const;
156 std::shared_ptr<Type>
ResultType(
const std::shared_ptr<Type>& source_type)
const;
192 std::string_view name,
const std::shared_ptr<BoundPredicate>& predicate);
204 std::string_view name,
const std::shared_ptr<BoundPredicate>& predicate);
226 return lhs.Equals(rhs);
240 [[nodiscard]]
virtual bool Equals(
const Transform& other)
const;
244 std::variant<std::monostate, int32_t> param_;
257 std::string_view transform_str);
290 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
Definition expected.h:1199
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:34
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:63
void unreachable() noexcept
Marks a branch the program can never take.
Definition unreachable.h:35
TransformType
Transform types used for partitioning.
Definition transform.h:40
@ 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.
Define Result, Status, and error helpers.
Portable stand-in for std::unreachable.