Calculate optimal size according to the number of distinct values and false positive probability. @param ndv The number of distinct values. @param fpp The false positive probability. @return it always return a value between kMinimumBloomFilterBytes and kMaximumBloomFilterBytes, and the return value is always a power of 2
| 234 | /// @return it always return a value between kMinimumBloomFilterBytes and |
| 235 | /// kMaximumBloomFilterBytes, and the return value is always a power of 2 |
| 236 | static uint32_t OptimalNumOfBytes(uint64_t ndv, double fpp) { |
| 237 | uint32_t optimal_num_of_bits = OptimalNumOfBits(ndv, fpp); |
| 238 | ARROW_DCHECK(::arrow::bit_util::IsMultipleOf8(optimal_num_of_bits)); |
| 239 | return optimal_num_of_bits >> 3; |
| 240 | } |
| 241 | |
| 242 | /// Calculate optimal size according to the number of distinct values and false |
| 243 | /// positive probability. |