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

Function create_unicode_string_view_array

datafusion/functions/benches/pad.rs:66–80  ·  view source on GitHub ↗
(
    size: usize,
    null_density: f32,
)

Source from the content-addressed store, hash-verified

64}
65
66fn create_unicode_string_view_array(
67 size: usize,
68 null_density: f32,
69) -> arrow::array::StringViewArray {
70 let mut rng = rand::rng();
71 let mut builder = StringViewBuilder::with_capacity(size);
72 for i in 0..size {
73 if rng.random::<f32>() < null_density {
74 builder.append_null();
75 } else {
76 builder.append_value(UNICODE_STRINGS[i % UNICODE_STRINGS.len()]);
77 }
78 }
79 builder.finish()
80}
81
82struct Filter<Dist> {
83 dist: Dist,

Callers 1

create_unicode_pad_argsFunction · 0.85

Calls 4

append_nullMethod · 0.45
append_valueMethod · 0.45
lenMethod · 0.45
finishMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…