alamb commented on code in PR #11787:
URL: https://github.com/apache/datafusion/pull/11787#discussion_r1702688608


##########
datafusion/expr/src/type_coercion/functions.rs:
##########
@@ -573,6 +573,8 @@ fn coerced_from<'a>(
         (Interval(_), _) if matches!(type_from, Utf8 | LargeUtf8) => {
             Some(type_into.clone())
         }
+        // We can go into a Utf8View from a Utf8 or LargeUtf8
+        (Utf8View, _) if matches!(type_from, Utf8 | LargeUtf8) => 
Some(type_into.clone()),

Review Comment:
   The arrow cast kernel supports this conversion
   
   Though I am not sure if we should allow the automatic coercion as it could 
potentially fail if the strings were over 2GB



##########
datafusion/expr/src/type_coercion/functions.rs:
##########
@@ -573,6 +573,8 @@ fn coerced_from<'a>(
         (Interval(_), _) if matches!(type_from, Utf8 | LargeUtf8) => {
             Some(type_into.clone())
         }
+        // We can go into a Utf8View from a Utf8 or LargeUtf8
+        (Utf8View, _) if matches!(type_from, Utf8 | LargeUtf8) => 
Some(type_into.clone()),

Review Comment:
   The arrow cast kernel supports this conversion
   
   Though I am not sure if we should allow the automatic coercion as it could 
potentially fail if the strings were over 2GB 🤔 



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