pub fn coerced_type_with_base_type_only(
data_type: &DataType,
base_type: &DataType,
array_coercion: Option<&ListCoercion>,
) -> DataType
Expand description
A helper function to coerce base type in List.
Example
use arrow::datatypes::{DataType, Field};
use datafusion_common::utils::coerced_type_with_base_type_only;
use std::sync::Arc;
let data_type = DataType::List(Arc::new(Field::new_list_field(DataType::Int32, true)));
let base_type = DataType::Float64;
let coerced_type = coerced_type_with_base_type_only(&data_type, &base_type, None);
assert_eq!(coerced_type, DataType::List(Arc::new(Field::new_list_field(DataType::Float64, true))));