Jefffrey commented on code in PR #21855:
URL: https://github.com/apache/datafusion/pull/21855#discussion_r3142997447


##########
datafusion/common/src/utils/mod.rs:
##########
@@ -594,11 +594,17 @@ pub fn base_type(data_type: &DataType) -> DataType {
     match data_type {
         DataType::List(field)
         | DataType::LargeList(field)
+        | DataType::ListView(field)
+        | DataType::LargeListView(field)
         | DataType::FixedSizeList(field, _) => base_type(field.data_type()),
         _ => data_type.to_owned(),
     }
 }
 
+// TODO: Modify this to also allow specifying how listviews should be treated.
+//       For example if cast to List (default) or maintain as ListView 
(requires
+//       function to implement support for ListViews)
+//       https://github.com/apache/datafusion/issues/21777

Review Comment:
   Issue won't be closed with this PR; in followups aim to allow users to 
specify if they wish to keep `ListView` natively (similar to `FixedSizeList`) 
in case the implementation has a code path for view type



##########
datafusion/expr/src/type_coercion/functions.rs:
##########
@@ -432,6 +432,8 @@ fn get_valid_types(
                     ArrayFunctionArgument::Index => DataType::Int64,
                     ArrayFunctionArgument::String => DataType::Utf8,
                     ArrayFunctionArgument::Element => element_type.clone(),
+                    // TODO: support maintaining ListView types here
+                    // https://github.com/apache/datafusion/issues/21777

Review Comment:
   Same as above comment



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to