From 8c976b68f3a40fff08e9f2ae23b4e8af7829386a Mon Sep 17 00:00:00 2001 From: ion-elgreco <15728914+ion-elgreco@users.noreply.github.com> Date: Sat, 18 Nov 2023 17:34:31 +0100 Subject: [PATCH] add LargeUtf8 support in partition stringify --- crates/deltalake-core/src/writer/utils.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/deltalake-core/src/writer/utils.rs b/crates/deltalake-core/src/writer/utils.rs index 5aa1ca4347..173340f368 100644 --- a/crates/deltalake-core/src/writer/utils.rs +++ b/crates/deltalake-core/src/writer/utils.rs @@ -5,7 +5,8 @@ use std::io::Write; use std::sync::Arc; use arrow::array::{ - as_boolean_array, as_generic_binary_array, as_primitive_array, as_string_array, Array, + as_boolean_array, as_generic_binary_array, as_largestring_array, as_primitive_array, + as_string_array, Array, }; use arrow::datatypes::{ DataType, Date32Type, Date64Type, Float32Type, Float64Type, Int16Type, Int32Type, Int64Type, @@ -187,6 +188,7 @@ pub(crate) fn stringified_partition_value( DataType::Float32 => as_primitive_array::(arr).value(0).to_string(), DataType::Float64 => as_primitive_array::(arr).value(0).to_string(), DataType::Utf8 => as_string_array(arr).value(0).to_string(), + DataType::LargeUtf8 => as_largestring_array(arr).value(0).to_string(), DataType::Boolean => as_boolean_array(arr).value(0).to_string(), DataType::Date32 => as_primitive_array::(arr) .value_as_date(0)