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

Function generate_sorted_strings

test-utils/src/data_gen.rs:226–237  ·  view source on GitHub ↗
(
    rng: &mut StdRng,
    count: usize,
    str_len: Range<usize>,
)

Source from the content-addressed store, hash-verified

224}
225
226fn generate_sorted_strings(
227 rng: &mut StdRng,
228 count: usize,
229 str_len: Range<usize>,
230) -> Vec<String> {
231 let mut strings: Vec<_> = (0..count)
232 .map(|_| random_string(rng, str_len.clone()))
233 .collect();
234
235 strings.sort_unstable();
236 strings
237}
238
239/// Iterator that generates sorted, [`RecordBatch`]es with randomly generated data with
240/// an access log style schema for tracing or monitoring type

Callers 1

appendMethod · 0.85

Calls 4

collectMethod · 0.80
random_stringFunction · 0.70
mapMethod · 0.45
cloneMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…