pub fn transform_arrow(
array: ArrayRef,
transform: &Transform,
) -> Result<ArrayRef, ArrowError>Expand description
Applies an Iceberg partition transform to an Arrow array
§Arguments
array- The Arrow array to transformtransform- The Iceberg partition transform to apply
§Returns
Ok(ArrayRef)- A new Arrow array containing the transformed valuesErr(ArrowError)- If the transform cannot be applied to the array’s data type
§Supported Transforms
- Identity - Returns the input array unchanged
- Day - Extracts day from date32 or timestamp
- Month - Extracts month from date32 or timestamp
- Year - Extracts year from date32 or timestamp
- Hour - Extracts hour from timestamp
- Int16 - Truncate value
- Int32 - Truncate value
- Int64 - Truncate value
- Int32 - Use hash of value to repart it between bucket
- Int64 - Use hash of value to repart it between bucket
- Date32 - Use hash of value to repart it between bucket
- Time32 - Use hash of value to repart it between bucket
- Utf8 - Use hash of value to repart it between bucket