jayzhan211 commented on code in PR #8902:
URL: https://github.com/apache/arrow-datafusion/pull/8902#discussion_r1461316541


##########
datafusion/expr/src/type_coercion/functions.rs:
##########
@@ -104,23 +105,40 @@ fn get_valid_types(
         let elem_base_type = datafusion_common::utils::base_type(elem_type);
         let new_base_type = comparison_coercion(&array_base_type, 
&elem_base_type);
 
-        if new_base_type.is_none() {
-            return internal_err!(
+        let new_base_type = new_base_type.ok_or_else(|| {
+            internal_datafusion_err!(
                 "Coercion from {array_base_type:?} to {elem_base_type:?} not 
supported."
-            );
-        }
-        let new_base_type = new_base_type.unwrap();
+            )
+        })?;
 
         let array_type = 
datafusion_common::utils::coerced_type_with_base_type_only(
             array_type,
             &new_base_type,
         );
 
+        // type coercion for nested FixedSizeList
+        let elem_type = 
datafusion_common::utils::coerced_type_with_base_type_only(

Review Comment:
   It seems you are convert fixsize to list here. But it could be handled in 
`coerce_arguments_for_fun` later on. 



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