Function datafusion::common::utils::base_type

source ยท
pub fn base_type(data_type: &DataType) -> DataType
Expand description

Get the base type of a data type.

Example

use arrow::datatypes::{DataType, Field};
use datafusion_common::utils::base_type;
use std::sync::Arc;

let data_type = DataType::List(Arc::new(Field::new("item", DataType::Int32, true)));
assert_eq!(base_type(&data_type), DataType::Int32);

let data_type = DataType::Int32;
assert_eq!(base_type(&data_type), DataType::Int32);