MCPcopy Create free account
hub / github.com/apache/datafusion / create_data

Function create_data

datafusion/core/benches/data_utils/mod.rs:77–87  ·  view source on GitHub ↗
(rng: &mut StdRng, size: usize, null_density: f64)

Source from the content-addressed store, hash-verified

75}
76
77fn create_data(rng: &mut StdRng, size: usize, null_density: f64) -> Vec<Option<f64>> {
78 (0..size)
79 .map(|_| {
80 if rng.random::<f64>() > null_density {
81 None
82 } else {
83 Some(rng.random::<f64>())
84 }
85 })
86 .collect()
87}
88
89fn create_record_batch(
90 schema: SchemaRef,

Callers 1

create_record_batchFunction · 0.85

Calls 2

collectMethod · 0.80
mapMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…