| 104 | |
| 105 | template <typename ArrayType> |
| 106 | Status MakeRandomArray(int64_t length, bool include_nulls, MemoryPool* pool, |
| 107 | std::shared_ptr<Array>* out, uint32_t seed) { |
| 108 | random::RandomArrayGenerator rand(seed); |
| 109 | const double null_probability = include_nulls ? 0.5 : 0.0; |
| 110 | |
| 111 | *out = rand.Numeric<ArrayType>(length, 0, 1000, null_probability); |
| 112 | |
| 113 | return Status::OK(); |
| 114 | } |
| 115 | |
| 116 | template <> |
| 117 | Status MakeRandomArray<Int8Type>(int64_t length, bool include_nulls, MemoryPool* pool, |