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 2021/01/12 17:43:30 UTC

[GitHub] [arrow] Dandandan commented on a change in pull request #9174: ARROW-11220: [Rust] Implement GROUP BY support for Boolean

Dandandan commented on a change in pull request #9174:
URL: https://github.com/apache/arrow/pull/9174#discussion_r555958013



##########
File path: rust/datafusion/src/physical_plan/hash_join.rs
##########
@@ -447,6 +447,11 @@ pub(crate) fn create_key(
                 // store the string value
                 vec.extend_from_slice(value.as_bytes());
             }
+            DataType::Boolean => {
+                let array = col.as_any().downcast_ref::<BooleanArray>().unwrap();
+                let x: u8 = if array.value(row) { 1 } else { 0 };

Review comment:
       This could probably also use `array.value(row) as u8`?




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

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