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

Function random_string

datafusion/physical-expr/benches/in_list.rs:48–51  ·  view source on GitHub ↗

Generates a random alphanumeric string of the specified length.

(rng: &mut StdRng, len: usize)

Source from the content-addressed store, hash-verified

46
47/// Generates a random alphanumeric string of the specified length.
48fn random_string(rng: &mut StdRng, len: usize) -> String {
49 let value = rng.sample_iter(&Alphanumeric).take(len).collect();
50 String::from_utf8(value).unwrap()
51}
52
53const IN_LIST_LENGTHS: [usize; 4] = [3, 8, 28, 100];
54const LIST_WITH_COLUMNS_LENGTHS: [usize; 3] = [3, 8, 28];

Callers 3

bench_string_typeFunction · 0.70
bench_with_columns_utf8Function · 0.70

Calls 2

collectMethod · 0.80
takeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…