Function datafusion_python::datafusion_common::arrow::array::as_string_array
source · pub fn as_string_array(
arr: &dyn Array,
) -> &GenericByteArray<GenericStringType<i32>>Expand description
Force downcast of an Array, such as an ArrayRef to
StringArray, panicking on failure.
§Example
let arr: ArrayRef = Arc::new(StringArray::from_iter(vec![Some("foo")]));
let string_array = as_string_array(&arr);