Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/apache/datafusion
/ sample
Method
sample
datafusion/functions/benches/substr_index.rs:46–53 ·
view source on GitHub ↗
(&self, rng: &mut R)
Source
from the content-addressed store, hash-verified
44
Test: Fn(&T) -> bool,
45
{
46
fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> T {
47
loop {
48
let x = self.dist.sample(rng);
49
if (self.test)(&x) {
50
return x;
51
}
52
}
53
}
54
}
55
56
#[derive(Clone, Copy)]
Callers
1
array_data
Function · 0.45
Calls
no outgoing calls
Tested by
no test coverage detected