alamb commented on code in PR #10985: URL: https://github.com/apache/datafusion/pull/10985#discussion_r1645234123
########## datafusion/expr/src/type_coercion/binary.rs: ########## @@ -932,6 +932,7 @@ fn string_coercion(lhs_type: &DataType, rhs_type: &DataType) -> Option<DataType> (LargeUtf8, Utf8) => Some(LargeUtf8), (Utf8, LargeUtf8) => Some(LargeUtf8), (LargeUtf8, LargeUtf8) => Some(LargeUtf8), + (Utf8View, Utf8View) => Some(Utf8View), Review Comment: I agree we should permit to/coercion from any "string" / "binary" type to the associated view type. It is probably good to make sure the coercion does the cheap direction when possible For example, we shouldn't be converting `StringViewArray` --> `StringArray` as that will copy all the strings. Instead we should convert `StringArray` --> `StringViewArray` which is relatively cheap (we just have to copy the views) I think this feature -- coercion -- is probably worth its own ticket and doesn't need to be done in this PR. I'll file a follow on ticket in the morning -- 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: github-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org