diff --git a/arrow-cast/src/cast/mod.rs b/arrow-cast/src/cast/mod.rs index c96e7c8f6a1..5f08dcbfc13 100644 --- a/arrow-cast/src/cast/mod.rs +++ b/arrow-cast/src/cast/mod.rs @@ -913,9 +913,9 @@ pub fn cast_with_options( Utf8 => value_to_string::(array, cast_options), LargeUtf8 => value_to_string::(array, cast_options), Utf8View => value_to_string_view(array, cast_options), - _ => Err(ArrowError::CastError( - "Cannot cast list to non-list data types".to_string(), - )), + dt => Err(ArrowError::CastError(format!( + "Cannot cast LIST to non-list data type {dt}" + ))), }, (_, List(to)) => cast_values_to_list::(array, to, cast_options), (_, LargeList(to)) => cast_values_to_list::(array, to, cast_options),