Extracts the i32 values from the set of batches and returns them as a single Vec
(batches: &[RecordBatch])
| 35 | |
| 36 | /// Extracts the i32 values from the set of batches and returns them as a single Vec |
| 37 | pub fn batches_to_vec(batches: &[RecordBatch]) -> Vec<Option<i32>> { |
| 38 | batches |
| 39 | .iter() |
| 40 | .flat_map(|batch| { |
| 41 | assert_eq!(batch.num_columns(), 1); |
| 42 | as_int32_array(batch.column(0)).unwrap().iter() |
| 43 | }) |
| 44 | .collect() |
| 45 | } |
| 46 | |
| 47 | /// extract i32 values from batches and sort them |
| 48 | pub fn partitions_to_sorted_vec(partitions: &[Vec<RecordBatch>]) -> Vec<Option<i32>> { |
searching dependent graphs…