Returns the value of results. For example, returns 6 given the following ```text +-------+, | count |, +-------+, | 6 |, +-------+, ```
(res: Vec<RecordBatch>)
| 319 | /// +-------+, |
| 320 | /// ``` |
| 321 | fn extract_count(res: Vec<RecordBatch>) -> u64 { |
| 322 | assert_eq!(res.len(), 1, "expected one batch, got {}", res.len()); |
| 323 | let batch = &res[0]; |
| 324 | assert_eq!( |
| 325 | batch.num_columns(), |
| 326 | 1, |
| 327 | "expected 1 column, got {}", |
| 328 | batch.num_columns() |
| 329 | ); |
| 330 | let col = batch.column(0).as_primitive::<UInt64Type>(); |
| 331 | assert_eq!(col.len(), 1, "expected 1 row, got {}", col.len()); |
| 332 | |
| 333 | col.iter() |
| 334 | .next() |
| 335 | .expect("had value") |
| 336 | .expect("expected non null") |
| 337 | } |
| 338 | |
| 339 | // Test inserting a single batch of data into a single partition |
| 340 | #[tokio::test] |