Return a RecordBatch with a single Int32 array with values (0..sz) in a field named "i"
(sz: i32)
| 628 | |
| 629 | /// Return a RecordBatch with a single Int32 array with values (0..sz) in a field named "i" |
| 630 | pub fn make_partition(sz: i32) -> RecordBatch { |
| 631 | let seq_start = 0; |
| 632 | let seq_end = sz; |
| 633 | let values = (seq_start..seq_end).collect::<Vec<_>>(); |
| 634 | let schema = Arc::new(Schema::new(vec![Field::new("i", DataType::Int32, true)])); |
| 635 | let arr = Arc::new(Int32Array::from(values)); |
| 636 | |
| 637 | RecordBatch::try_new(schema, vec![arr as ArrayRef]).unwrap() |
| 638 | } |
| 639 | |
| 640 | /// Get the schema for the aggregate_test_* csv files |
| 641 | pub fn aggr_test_schema() -> SchemaRef { |
searching dependent graphs…