Create an string column of random values, with the specified number of rows, sorted the default
(size: usize)
| 142 | /// Create an string column of random values, with the specified number of |
| 143 | /// rows, sorted the default |
| 144 | fn new_str(size: usize) -> Self { |
| 145 | let mut rng = rng(); |
| 146 | let mut data: Vec<Option<String>> = (0..size / 3) |
| 147 | .map(|_| { |
| 148 | // no nulls for now |
| 149 | Some(get_random_string(16)) |
| 150 | }) |
| 151 | .collect(); |
| 152 | |
| 153 | // have some repeats (approximately 1/3 of the values are the same) |
| 154 | while data.len() < size { |
| 155 | data.push(data[rng.random_range(0..data.len())].clone()); |
| 156 | } |
| 157 | |
| 158 | let batches = stagger_batch(string_batch(data.iter())); |
| 159 | |
| 160 | let mut sorted = data; |
| 161 | sorted.sort_unstable(); |
| 162 | |
| 163 | Self::Str { batches, sorted } |
| 164 | } |
| 165 | |
| 166 | /// Create two columns of random values (int64, string), with the specified number of |
| 167 | /// rows, sorted the default |
nothing calls this directly
no test coverage detected