alamb commented on code in PR #8293:
URL: https://github.com/apache/arrow-datafusion/pull/8293#discussion_r1401148848


##########
datafusion/common/src/utils.rs:
##########
@@ -390,6 +391,27 @@ pub fn arrays_into_list_array(
     ))
 }
 
+/// 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)));
+/// let base_type = base_type(&data_type);
+/// assert_eq!(base_type, DataType::Int32);
+pub fn base_type(data_type: &DataType) -> DataType {

Review Comment:
   ```suggestion
   /// ```
   pub fn base_type(data_type: &DataType) -> DataType {
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to