timsaucer opened a new issue, #13907: URL: https://github.com/apache/datafusion/issues/13907
### Describe the bug initcap was updated in this PR: https://github.com/apache/datafusion/pull/13752 `InitcapFunc` is reporting that the return type will be `Utf8` but if the argument is an `Utf8View` then the actual returned values are also `Utf8View` (as I would expect) so we have a difference between the expected and returned types. I think this is a very easy fix. On part that I could use some help with from someone more experienced with the Utf8View is this: in `get_optimal_return_type` macro we state that `DataType::Utf8View` has an optimal return type of of `Utf8` during the macro invocation. Is this the best type? Why would we not want to return a Utf8View? ### To Reproduce Call `initcap` with a Utf8View argument. ### Expected behavior No error. Currently I get this error: Exception: Arrow error: Invalid argument error: column types must match schema types, expected Utf8 but found Utf8View at column index 0 ### Additional context _No response_ -- 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.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