Create a record batch with i64 column "x" and utf8 column "y"
(
values: impl IntoIterator<Item = &'a (Option<i64>, Option<String>)> + Clone,
)
| 269 | |
| 270 | /// Create a record batch with i64 column "x" and utf8 column "y" |
| 271 | fn i64string_batch<'a>( |
| 272 | values: impl IntoIterator<Item = &'a (Option<i64>, Option<String>)> + Clone, |
| 273 | ) -> RecordBatch { |
| 274 | let ints = values.clone().into_iter().map(|(i, _)| *i); |
| 275 | let strings = values.into_iter().map(|(_, s)| s); |
| 276 | RecordBatch::try_from_iter(vec![ |
| 277 | ("x", Arc::new(Int64Array::from_iter(ints)) as _), |
| 278 | ("y", Arc::new(StringArray::from_iter(strings)) as _), |
| 279 | ]) |
| 280 | .unwrap() |
| 281 | } |
| 282 | |
| 283 | /// Run the TopK test, sorting the input batches with the specified fetch |
| 284 | /// (limit) and compares the results to the expected values. |
no test coverage detected
searching dependent graphs…