57 std::string_view str) {
60 return InvalidArgument(
"Invalid SortDirection string: {}", str);
84 return InvalidArgument(
"Invalid NullOrder string: {}", str);
95 SortField(int32_t source_id, std::shared_ptr<Transform> transform,
119 return lhs.Equals(rhs);
124 [[nodiscard]]
bool Equals(
const SortField& other)
const;
127 std::shared_ptr<Transform> transform_;
128 SortDirection direction_;
129 NullOrder null_order_;
a field with its transform.
Definition sort_field.h:88
std::string ToString() const override
Get a user-readable string representation.
bool Satisfies(const SortField &other) const
Checks whether this field's order satisfies another field's order.
SortDirection direction() const
Get the sort direction.
NullOrder null_order() const
Get the null order.
SortField(int32_t source_id, std::shared_ptr< Transform > transform, SortDirection direction, NullOrder null_order)
Construct a field.
const std::shared_ptr< Transform > & transform() const
Get the transform type.
int32_t source_id() const
Get the source field ID.
Define symbol visibility macros for core Iceberg APIs.
Core Apache Iceberg C++ APIs.
Definition arrow_io_util.h:33
ICEBERG_EXPORT constexpr Result< NullOrder > NullOrderFromString(std::string_view str)
Get the relative null order from name.
Definition sort_field.h:81
SortDirection
Sort direction in a partition, either ascending or descending.
Definition sort_field.h:38
ICEBERG_EXPORT std::string_view ToString(Expression::Operation op)
Returns a string representation of an expression operation.
ICEBERG_EXPORT constexpr Result< SortDirection > SortDirectionFromString(std::string_view str)
Get the relative sort direction from name.
Definition sort_field.h:56
NullOrder
Definition sort_field.h:63
@ kFirst
Nulls are sorted first.
@ kLast
Nulls are sorted last.
std::expected< T, E > Result
Result alias.
Definition result.h:88
Define Result, Status, and error helpers.