Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
base_type in datafusion::common::utils - Rust
[go: Go Back, main page]

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);