parthchandra commented on code in PR #2897:
URL: https://github.com/apache/datafusion-comet/pull/2897#discussion_r3081418417


##########
native/spark-expr/src/conversion_funcs/cast.rs:
##########
@@ -387,8 +369,23 @@ pub(crate) fn cast_array(
             cast_options,
         )?),
         (List(_), Utf8) => Ok(cast_array_to_string(array.as_list(), 
cast_options)?),
-        (List(_), List(_)) if can_cast_types(&from_type, to_type) => {
-            Ok(cast_with_options(&array, to_type, &CAST_OPTIONS)?)
+        (List(_), List(to)) => {

Review Comment:
   We can add a comment inside the new (List(_), List(to)) arm explaining that 
element values are cast recursively through cast_array (applying Spark 
semantics), and that the old can_cast_types guard was tied to the old approach 
of delegating to Arrow's cast.
   



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