| 331 | } |
| 332 | |
| 333 | Status MakeFloatBatchSized(int length, std::shared_ptr<RecordBatch>* out, uint32_t seed) { |
| 334 | // Make the schema |
| 335 | auto f0 = field("f0", float16()); |
| 336 | auto f1 = field("f1", float32()); |
| 337 | auto f2 = field("f2", float64()); |
| 338 | auto schema = ::arrow::schema({f0, f1, f2}); |
| 339 | |
| 340 | // Example data |
| 341 | std::shared_ptr<Array> a0, a1, a2; |
| 342 | MemoryPool* pool = default_memory_pool(); |
| 343 | RETURN_NOT_OK(MakeRandomArray<HalfFloatType>(length, false, pool, &a0, seed)); |
| 344 | RETURN_NOT_OK(MakeRandomArray<FloatType>(length, false, pool, &a1, seed + 1)); |
| 345 | RETURN_NOT_OK(MakeRandomArray<DoubleType>(length, true, pool, &a2, seed + 2)); |
| 346 | *out = RecordBatch::Make(schema, length, {a0, a1, a2}); |
| 347 | return Status::OK(); |
| 348 | } |
| 349 | |
| 350 | Status MakeFloatBatch(std::shared_ptr<RecordBatch>* out) { |
| 351 | return MakeFloatBatchSized(10, out); |
no test coverage detected