| 198 | } // namespace |
| 199 | |
| 200 | std::shared_ptr<Buffer> RandomArrayGenerator::NullBitmap(int64_t size, |
| 201 | double null_probability, |
| 202 | int64_t alignment, |
| 203 | MemoryPool* memory_pool) { |
| 204 | // The bitmap generator does not care about the value distribution since it |
| 205 | // only calls the GenerateBitmap method. |
| 206 | using GenOpt = GenerateOptions<int, std::uniform_int_distribution<int>>; |
| 207 | |
| 208 | GenOpt null_gen(seed(), 0, 1, null_probability); |
| 209 | std::shared_ptr<Buffer> bitmap = *AllocateEmptyBitmap(size, alignment, memory_pool); |
| 210 | null_gen.GenerateBitmap(bitmap->mutable_data(), size, nullptr); |
| 211 | |
| 212 | return bitmap; |
| 213 | } |
| 214 | |
| 215 | std::shared_ptr<Array> RandomArrayGenerator::Boolean(int64_t size, |
| 216 | double true_probability, |