(rng: &mut ThreadRng, column_type: &DataType)
| 318 | } |
| 319 | |
| 320 | fn random_value(rng: &mut ThreadRng, column_type: &DataType) -> ScalarValue { |
| 321 | match column_type { |
| 322 | DataType::Float64 => ScalarValue::Float64(Some(rng.random())), |
| 323 | DataType::Boolean => ScalarValue::Boolean(Some(rng.random())), |
| 324 | DataType::Utf8 => ScalarValue::Utf8(Some( |
| 325 | rng.sample_iter(&Alphanumeric) |
| 326 | .take(10) |
| 327 | .map(char::from) |
| 328 | .collect(), |
| 329 | )), |
| 330 | other => unimplemented!("No random value generation implemented for {other:?}"), |
| 331 | } |
| 332 | } |
no test coverage detected
searching dependent graphs…