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/05/14 02:14:31 UTC

[GitHub] [arrow-rs] Jimexist commented on a change in pull request #275: Add nullary function and some unit tests

Jimexist commented on a change in pull request #275:
URL: https://github.com/apache/arrow-rs/pull/275#discussion_r632228845



##########
File path: arrow/src/compute/kernels/arity.rs
##########
@@ -72,3 +73,37 @@ where
     let data = into_primitive_array_data::<_, O>(array, buffer);
     PrimitiveArray::<O>::from(data)
 }
+
+/// Applies a nullary and infalible function to generate a primitive array.
+/// You should use this instead of the vectorized version when each generated value is different.
+pub fn nullary<F, O>(size: usize, op: F) -> PrimitiveArray<O>

Review comment:
       happy to close this PR if not needed.




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