| 3280 | }); |
| 3281 | |
| 3282 | Result<std::shared_ptr<RecordBatch>> MakeBatchWithDictionaries(const int length) { |
| 3283 | auto dict_type = dictionary(int32(), int32()); |
| 3284 | auto schema_ = ::arrow::schema( |
| 3285 | {::arrow::field("i32", int32()), ::arrow::field("i32d", dict_type)}); |
| 3286 | std::shared_ptr<Array> i32, i32d_values, i32d_indices; |
| 3287 | RETURN_NOT_OK(MakeRandomInt32Array(length, false, arrow::default_memory_pool(), &i32)); |
| 3288 | RETURN_NOT_OK( |
| 3289 | MakeRandomInt32Array(length, false, arrow::default_memory_pool(), &i32d_values)); |
| 3290 | RETURN_NOT_OK(MakeRandomInt32Array(length, false, arrow::default_memory_pool(), |
| 3291 | &i32d_indices, 0, 0, length)); |
| 3292 | std::shared_ptr<Array> i32d = |
| 3293 | std::make_shared<DictionaryArray>(dict_type, i32d_indices, i32d_values); |
| 3294 | return RecordBatch::Make(std::move(schema_), length, {i32, i32d}); |
| 3295 | } |
| 3296 | |
| 3297 | Result<std::shared_ptr<io::RandomAccessFile>> MakeFileWithDictionaries( |
| 3298 | const std::unique_ptr<TemporaryDir>& tempdir, int rows_per_batch, int num_batches) { |
nothing calls this directly
no test coverage detected