You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "tustvold (via GitHub)" <gi...@apache.org> on 2023/06/05 16:28:59 UTC

[GitHub] [arrow-rs] tustvold commented on a diff in pull request #4367: minor: use take_boolean to remove useless TODO

tustvold commented on code in PR #4367:
URL: https://github.com/apache/arrow-rs/pull/4367#discussion_r1218314749


##########
arrow-select/src/take.rs:
##########
@@ -476,7 +476,7 @@ where
 }
 
 /// `take` implementation for boolean arrays
-fn take_boolean<IndexType>(
+pub fn take_boolean<IndexType>(

Review Comment:
   I'm not sure about this, we currently don't expose these both to keep the API surface down



##########
arrow-ord/src/comparison.rs:
##########
@@ -1196,8 +1196,7 @@ where
     K: ArrowDictionaryKeyType,
     K::Native: num::ToPrimitive,
 {
-    // TODO: Use take_boolean (#2967)
-    let array = take(&dict_comparison, dict.keys(), None)?;
+    let array = take_boolean(&dict_comparison, dict.keys())?;

Review Comment:
   ```suggestion
       let array = take(&dict_comparison, dict.keys())?.as_boolean().clone();
   ```
   Perhaps?



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