[
https://issues.apache.org/jira/browse/ARROW-14254?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17435666#comment-17435666
]
Neal Richardson commented on ARROW-14254:
-----------------------------------------
I don't follow why you need 2 scans if you're using a RNG: it's either generate
random and take top N, or generate uniform random (0, 1) and take rand < prop,
like in your example 2. (The prop version may not give an exact percentage,
it's only correct in expectation, but maybe that's good enough.)
> [C++] Return a random sample of rows from a query
> -------------------------------------------------
>
> Key: ARROW-14254
> URL: https://issues.apache.org/jira/browse/ARROW-14254
> Project: Apache Arrow
> Issue Type: Improvement
> Components: C++
> Reporter: Nicola Crane
> Priority: Major
> Labels: kernel, query-engine
> Fix For: 7.0.0
>
>
> Please can we have a kernel that returns a random sample of rows? We've had a
> request to be able to do this in R:
> https://github.com/apache/arrow-cookbook/issues/83
--
This message was sent by Atlassian Jira
(v8.3.4#803005)