You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/05/24 21:38:43 UTC

[GitHub] [arrow-rs] nevi-me commented on a diff in pull request #1738: Support casting `Utf8` to `Boolean`

nevi-me commented on code in PR #1738:
URL: https://github.com/apache/arrow-rs/pull/1738#discussion_r880971793


##########
arrow/src/compute/kernels/cast.rs:
##########
@@ -280,6 +280,8 @@ pub fn can_cast_types(from_type: &DataType, to_type: &DataType) -> bool {
 ///
 /// Behavior:
 /// * Boolean to Utf8: `true` => '1', `false` => `0`
+/// * Utf8 to boolean: `true`, `yes`, `on`, `1` => `true`, `false`, `no`, `off`, `0` => `false`,

Review Comment:
   I haven't come across "on", "off", "yes", "no" in practice. They're language specific, unlike T and F which are computing primitives.
   
   So I'd stick to "1", "true" and their inverses.



-- 
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-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org